# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
9243 |
2014-09-28T04:58:55 Z |
yukariko |
Wiring (kriii2_W) |
C |
|
4 ms |
5388 KB |
#include <stdio.h>
//#include <windows.h>
int q[100001];
int w[1001][1001];
int main()
{
int N;
int k,p;
int a,b;
int i;
int cnt;
scanf("%d",&N);
q[0] = 0;
cnt = 0;
for(i=1;i<=N*N;i++)
{
q[i] = (q[i-1]+i)%N;
a = q[i];
b = q[i-1];
if( (q[i]!=q[i-1]) && (w[a][b] != 1 ) )
{
cnt ++;
w[a][b] = 1;
w[b][a] = 1;
}
}
printf("%d",cnt);
//system("pause");
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
4 ms |
5388 KB |
SIGSEGV Segmentation fault |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |