제출 #882395

#제출 시각아이디문제언어결과실행 시간메모리
882395willychanAncient Machine (JOI21_ancient_machine)C++17
0 / 100
60 ms10484 KiB
#include "Anna.h" #include <vector> namespace { int variable_example = 0; } void Anna(int N, std::vector<char> S) { for(int i=0;i<N;i++){ if(S[i]=='X'){ Send(0); Send(0); } if(S[i]=='Y'){ Send(0); Send(1); } if(S[i]=='Z'){ Send(1); Send(0); } } }
#include "Bruno.h" #include <vector> #include<bits/stdc++.h> using namespace std; namespace { int variable_example = 0; int FunctionExample(int P) { return 1 - P; } } // namespace void Bruno(int N, int L, std::vector<int> A) { vector<int> arr(N); for(int i=0;i<N;i++){ int c = 2*A[2*i] + A[2*i+1]; arr[i]=c; } queue<int> z; vector<bool> taken(N,0); vector<tuple<int,int,int> > dostuff; for(int i=0;i<N;i++){ if(arr[i]==2) z.push(i); } stack<int> x; for(int i=0;i<N;i++){ if(arr[i]==0){ x.push(i); continue; } if(arr[i]==1){ while(x.size() && x.top()>i) x.pop(); while(z.size() && z.front()<i) z.pop(); if(x.size() && z.size()){ taken[x.top()]=1; taken[z.front()]=1; taken[i]=1; dostuff.push_back({x.top(),i,z.front()}); x.pop(); z.pop(); } } } for(int i=0;i<N;i++) if(!taken[i]) Remove(i); for(auto i : dostuff){ Remove(get<1>(i)); Remove(get<0>(i)); Remove(get<2>(i)); } }

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

Anna.cpp:6:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
    6 | int variable_example = 0;
      |     ^~~~~~~~~~~~~~~~

Bruno.cpp:10:5: warning: 'int {anonymous}::FunctionExample(int)' defined but not used [-Wunused-function]
   10 | int FunctionExample(int P) { return 1 - P; }
      |     ^~~~~~~~~~~~~~~
Bruno.cpp:8:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
    8 | int variable_example = 0;
      |     ^~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...