제출 #754198

#제출 시각아이디문제언어결과실행 시간메모리
754198nicksms동굴 (IOI13_cave)C++17
0 / 100
1291 ms460 KiB
#include "cave.h" #include <bits/stdc++.h> int ans[5000], w[5000], q[5000]; void exploreCave(int N) { for (int i = 0; i < N; i++) { memset(q,0,5000); for (int j = 0; j < i; j++) q[ans[j]]=w[j]; w[i]=(tryCombination(q)==i); for (int b = 1; b < N; b<<=1) { memset(q,0,5000); for (int k = 0; k < N; k++) { q[k]=1 ^ w[i] ^ __builtin_popcount(k & b); } for (int j = 0; j < i; j++) q[ans[j]]=w[j]; if (tryCombination(q)==i) ans[i] |= b; } } answer(ans,w); }

컴파일 시 표준 에러 (stderr) 메시지

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:8:24: warning: 'memset' used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size]
    8 |         memset(q,0,5000);
      |                        ^
cave.cpp:12:28: warning: 'memset' used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size]
   12 |             memset(q,0,5000);
      |                            ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...