×

# what is ioi style grading??

 0 I am trying to solve problems from past ico's in ICO online judge.i solved a problem(NEXTPERM). After submission the solution was accepted but i scored only 20 out of 100.The judge is showing that my solution has given correct answer to all the test cases. What can be the cause of scoring so bad??how can i improve my score?? link to the problem:http://opc.iarcs.org.in/index.php/problems/NEXTPERM my answer: #include int main() { long int n,p[1001],a[1001],b,c,d,e=0,f,g=1,h,i,j,k; scanf("%ld %ld",&n,&k); for (j=1;j<=k;j++) { for (b=0;ba[n-2]) { c=a[n-1]; a[n-1]=a[n-2]; a[n-2]=c; for(b=0;b1;b--) { if (a[b]>a[b-1]) break; } c=a[b-1]; for (d=b;da[d]) break; } a[b-1]=a[d-1]; a[d-1]=c; for (d=0;d=b;d--) { p[i]=a[d]; i++; } for (d=0;d<=n-1;d++) { a[d]=p[d]; if (d!=n-1) printf("%ld ",a[d]); else printf("%ld",a[d]); } } printf("\n"); } return 0; }  This question is marked "community wiki". asked 26 Nov '13, 10:19 2★buro 21●1●3●7 accept rate: 0% 4★kunal361 6.0k●13●32●72

 1 For Your Information, the maximum score for that problem is 20 answered 07 Dec '14, 11:43 3★p00r 139●1●6 accept rate: 10%
 0 perhaps you should look for a better and efficient algorithm..:) happy coding..:) answered 26 Nov '13, 10:21 3★bipin2 3.1k●25●46●71 accept rate: 8%
 0 In IOI style grading even if u get a few test files correct then u get partial marking...each test file is assigned a particular weight-age...so even if 1-2 test files out of the predefined number of test files are correct while the others are giving a WA or RE or TLE...it shows AC status and gives u a partial score...hope this helps...:) EDIT: can u provide a link to the problem and the link to ur solution...!!! EDIT 2: to increase ur score maybe u should check if u may be missing a few corner cases...or maybe some overflow maybe taking place or maybe some divide by zero(which may give RE) or maybe RE due to some segmentation fault(large array size) or maybe ur algo may not be efficient enough giving a TLE for the remaining test files so u may need to rethink on ur approach...!!! answered 26 Nov '13, 10:26 4★kunal361 6.0k●13●32●72 accept rate: 21% 1 i have added my answer and the problem link (26 Nov '13, 10:44) buro2★
 0 A simpler solution! m=map(int,raw_input().split()) n=m[0] k=m[1] for i in xrange(k): l=map(int,raw_input().split()) for i in xrange(n-1): ii=n-1-i if l[ii]>l[ii-1]: for j in xrange(ii,n): k=n-1+ii-j if l[k]>l[ii-1]: l[ii-1],l[k]=l[k],l[ii-1] l[ii:]=sorted(l[ii:]) break break ans='' for i in xrange(n): ans+=str(l[i]) ans+=' ' print ans  Algorithm explained here . Hope this helps answered 08 Jan '15, 23:48 3★mjnovice 134●3●5●13 accept rate: 0%
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×424
×242
×177
×5
×2

question asked: 26 Nov '13, 10:19

question was seen: 3,663 times

last updated: 08 Jan '15, 23:48