제출 #846904

#제출 시각아이디문제언어결과실행 시간메모리
846904AbitoMonster Game (JOI21_monster)C++17
0 / 100
2 ms600 KiB
#include "monster.h" #include <bits/stdc++.h> #define elif else if #define pb push_back using namespace std; const int N=205; int n,s[N],in[N],out[N]; bool b[N][N],adj[N][N]; namespace { bool example_variable; } // namespace std::vector<int> Solve(int N) { n=N; for (int i=0;i<n;i++){ for (int j=i+1;j<n;j++){ b[i][j]=Query(i,j); b[j][i]=!b[i][j]; } } for (int i=0;i<n;i++){ for (int j=0;j<n;j++){ if (!b[i][j]) continue; for (int k=0;k<n;k++){ if (!b[i][k] || !b[k][j]) continue; adj[i][j]=true; in[j]++; out[i]++; //cout<<i<<' '<<k<<' '<<j<<endl; break; } } } for (int i=0;i<n;i++) s[i]=out[i]+1; for (int i=0;i<n;i++){ for (int j=i+1;j<n;j++){ if (out[i]!=out[j]) continue; if (in[i]<in[j]) s[j]--; else s[i]--; } }vector<int> ans; for (int i=0;i<n;i++) ans.pb(s[i]); return ans; }

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

monster.cpp:11:6: warning: '{anonymous}::example_variable' defined but not used [-Wunused-variable]
   11 | bool example_variable;
      |      ^~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...