| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1207190 | Dpika | Memory (IOI10_memory) | C++20 | 컴파일 에러 | 0 ms | 0 KiB |
#include "grader.h"
#include "memory.h"
#include <bits/stdc++.h>
vector<pair<int,int>>v(25);
void play() {
int i;
char a, b;
for (i=0; i<100; i=i+2) {
if(i>=50){
int x,y;
x=v[(i-50)/2].first;
y=v[(i-50)/2].second;
a = faceup(x);
b = faceup(y);
}
else{
a = faceup(i+1);
b = faceup(i+2);
v[a-65].first=i+1;
v[b-65].first=i+2;
}
}
}
컴파일 시 표준 에러 (stderr) 메시지
memory.cpp:4:8: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
4 | vector<pair<int,int>>v(25);
| ^~~~
| std::pair
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from memory.cpp:3:
/usr/include/c++/11/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
memory.cpp:4:8: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
4 | vector<pair<int,int>>v(25);
| ^~~~
| std::pair
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from memory.cpp:3:
/usr/include/c++/11/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
memory.cpp:4:8: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
4 | vector<pair<int,int>>v(25);
| ^~~~
| std::pair
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from memory.cpp:3:
/usr/include/c++/11/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
memory.cpp:4:8: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
4 | vector<pair<int,int>>v(25);
| ^~~~
| std::pair
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from memory.cpp:3:
/usr/include/c++/11/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
memory.cpp:4:8: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
4 | vector<pair<int,int>>v(25);
| ^~~~
| std::pair
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from memory.cpp:3:
/usr/include/c++/11/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
memory.cpp:4:8: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
4 | vector<pair<int,int>>v(25);
| ^~~~
| std::pair
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from memory.cpp:3:
/usr/include/c++/11/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
memory.cpp:4:8: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
4 | vector<pair<int,int>>v(25);
| ^~~~
| std::pair
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from memory.cpp:3:
/usr/include/c++/11/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
memory.cpp:4:8: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
4 | vector<pair<int,int>>v(25);
| ^~~~
| std::pair
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from memory.cpp:3:
/usr/include/c++/11/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
memory.cpp:4:8: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
4 | vector<pair<int,int>>v(25);
| ^~~~
| std::pair
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from memory.cpp:3:
/usr/include/c++/11/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
memory.cpp:4:1: error: 'vector' does not name a type
4 | vector<pair<int,int>>v(25);
| ^~~~~~
memory.cpp: In function 'void play()':
memory.cpp:11:12: error: 'v' was not declared in this scope
11 | x=v[(i-50)/2].first;
| ^
memory.cpp:19:10: error: 'v' was not declared in this scope
19 | v[a-65].first=i+1;
| ^