# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
9244 |
2014-09-28T04:59:07 Z |
yukariko |
On grid (kriii2_O) |
C |
|
0 ms |
1352 KB |
#include <stdlib.h>
#include <stdio.h>
cmp(int *a,int *b){return *a>*b?-1:*a<*b?1:0;}
main()
{
int R,C;
scanf("%d%d",&R,&C);
int a[100001];
int i,z=R*C;
for(i=0;i<z;i++)
{
scanf("%d",a+i);
}
qsort(a,z,4,cmp);
int min=R<C?R:C;
int s=0;
for(i=0;i<min;i++)
{
s+=a[i];
if(a[i]<0)break;
}
printf("%d",s);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1352 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |