Submission #9287

#TimeUsernameProblemLanguageResultExecution timeMemory
9287hodducWiring (kriii2_W)C++98
1 / 4
0 ms5000 KiB
#include<stdio.h> #include<memory.h> int vis[1001][1001]; int main() { int N; scanf("%d", &N); /*for(N = 1; N <= 1000; N += 2){ int cur = 0, old; int c = 0; memset(vis, 0, sizeof(vis)); for(int j = N*N, k = 1;j>0;j--, k++) { old = cur; cur = cur + k; if(cur >= N) cur %= N; //printf("%d\n", cur); if(old!=cur && vis[old][cur] == 0) { c++; vis[old][cur] = 1; vis[cur][old] = 1; } } if(c != N-1){ printf("%d %d\n", N, c); } }*/ if(N % 2 == 0) printf("%d\n", N-1); else printf("%d\n", N/2); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...