제출 #139708

#제출 시각아이디문제언어결과실행 시간메모리
139708almogwald늑대인간 (IOI18_werewolf)C++14
15 / 100
4089 ms31760 KiB
#include <utility> #include <algorithm> #include <math.h> #include <vector> #include <set> #include <iostream> #include "werewolf.h" #define fori(i,n) for(int i=0;i<n;i++) #define forn(i,n) for(int i=1;i<n;i++) #define forib(i,n) for(int i=n-1;i>=0;i--) #define fornb(i,n) for(int i=n-1;i>0;i--) #define maxl 10000000000 #define con continue; typedef long long lol; using namespace std; typedef vector<int> veci; typedef pair<lol,lol> point; lol sum=0; #define k 500 veci check_validity(int n, veci X, veci Y,veci S, veci E,veci L,veci R) { vector<vector<int>> cons(n); int Q = S.size(); veci A(Q); fori(i,X.size()){ cons[X[i]].push_back(Y[i]); cons[Y[i]].push_back(X[i]); } fori(p,Q) { veci vist1(n); veci vist2(n); veci dfs; dfs.push_back(S[p]); while(!dfs.empty()){ int cur = dfs.back(); dfs.pop_back(); if(cur<L[p]||vist1[cur]){ con } vist1[cur]=1; fori(i,cons[cur].size()){ dfs.push_back(cons[cur][i]); } } dfs.push_back(E[p]); while(!dfs.empty()){ int cur = dfs.back(); dfs.pop_back(); if(cur>R[p]||vist2[cur]){ con } vist2[cur]=1; fori(i,cons[cur].size()){ dfs.push_back(cons[cur][i]); } } fori(i,n){ if(vist1[i]*vist2[i]){ A[p]=1; } } } return A; }

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

werewolf.cpp: In function 'veci check_validity(int, veci, veci, veci, veci, veci, veci)':
werewolf.cpp:9:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define fori(i,n) for(int i=0;i<n;i++)
werewolf.cpp:26:7:
  fori(i,X.size()){
       ~~~~~~~~~~                
werewolf.cpp:26:2: note: in expansion of macro 'fori'
  fori(i,X.size()){
  ^~~~
werewolf.cpp:9:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define fori(i,n) for(int i=0;i<n;i++)
werewolf.cpp:42:9:
    fori(i,cons[cur].size()){
         ~~~~~~~~~~~~~~~~~~      
werewolf.cpp:42:4: note: in expansion of macro 'fori'
    fori(i,cons[cur].size()){
    ^~~~
werewolf.cpp:9:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define fori(i,n) for(int i=0;i<n;i++)
werewolf.cpp:54:9:
    fori(i,cons[cur].size()){
         ~~~~~~~~~~~~~~~~~~      
werewolf.cpp:54:4: note: in expansion of macro 'fori'
    fori(i,cons[cur].size()){
    ^~~~
werewolf.cpp:59:15: warning: '*' in boolean context, suggest '&&' instead [-Wint-in-bool-context]
    if(vist1[i]*vist2[i]){
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...