Submission #9291

#TimeUsernameProblemLanguageResultExecution timeMemory
9291hodducWiring (kriii2_W)C++98
4 / 4
0 ms5000 KiB
#include<stdio.h> #include<memory.h> int vis[1001][1001]; int main() { long long int N; scanf("%lld", &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("%lld\n", N-1); else printf("%lld\n", N/2); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...