| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 9235 | yukariko | Wiring (kriii2_W) | C11 | 0 ms | 4992 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <stdio.h>
//#include <windows.h>
int q[1001];
int w[1000][1000];
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 |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
