제출 #993916

#제출 시각아이디문제언어결과실행 시간메모리
993916Lib마술쇼 (APIO24_show)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "Alice.h" long long n; vector <pair <int,int> > Alice(){ n=setN(); }
#include <bits/stdc++.h> #include "Bob.h" using namespace std; int toggled[500]; long long Bob(vector <pair<int,int> > adj){ long long xorhash=463222221001217544,ta,tb; for(int i=0;i<adj.size();i++){ ta=adj[i].first/34; tb=adj[i].first/34; if(ta==tb&&ta<=60){ toggled[ta]=1; } } ans=0; for(int i=0;i<=60;i++){ ans|=1 << i; } ans|=xorhash; return ans; }

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

Alice.cpp:4:1: error: 'vector' does not name a type
    4 | vector <pair <int,int> > Alice(){
      | ^~~~~~

Bob.cpp: In function 'long long int Bob(std::vector<std::pair<int, int> >)':
Bob.cpp:7:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    7 |  for(int i=0;i<adj.size();i++){
      |              ~^~~~~~~~~~~
Bob.cpp:14:2: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |  ans=0;
      |  ^~~
      |  abs