# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
724237 | 2023-04-14 23:26:13 | badont | Arranging Shoes (IOI19_shoes) | C++17 | 컴파일 에러 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "shoes.h"
#include <cmath>
#include <cstdlib>
#include <cassert>
template<typename T>
struct fen {
vector<T> tr;
ll mxn;
fen(ll sz) {
mxn = sz;
tr.assign(sz + 5, 0);
}
void upd(ll g, T k) {
g++;
assert(g != 0);
for (; g <= mxn; g += g&-g)
tr[g] += k;
}
T ge(ll g) {
g++;
T res = 0;
for (; g; g -= g&-g)
res += tr[g];
return res;
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
컴파일 시 표준 에러 (stderr) 메시지
shoes.cpp:8:2: error: 'vector' does not name a type 8 | vector<T> tr; | ^~~~~~ shoes.cpp:9:2: error: 'll' does not name a type 9 | ll mxn; | ^~ shoes.cpp:11:8: error: expected ')' before 'sz' 11 | fen(ll sz) { | ~ ^~~ | ) shoes.cpp:16:11: error: 'll' has not been declared 16 | void upd(ll g, T k) { | ^~ shoes.cpp:23:7: error: 'll' has not been declared 23 | T ge(ll g) { | ^~ shoes.cpp:31:8: error: 'll' has not been declared 31 | T rng(ll l, ll r) { if (l > r) return 0; return ge(r) - ge(l - 1); } | ^~ shoes.cpp:31:14: error: 'll' has not been declared 31 | T rng(ll l, ll r) { if (l > r) return 0; return ge(r) - ge(l - 1); } | ^~ shoes.cpp: In member function 'void fen<T>::upd(int, T)': shoes.cpp:19:15: error: 'mxn' was not declared in this scope 19 | for (; g <= mxn; g += g&-g) | ^~~ shoes.cpp:20:4: error: 'tr' was not declared in this scope 20 | tr[g] += k; | ^~ shoes.cpp: In member function 'T fen<T>::ge(int)': shoes.cpp:27:11: error: 'tr' was not declared in this scope 27 | res += tr[g]; | ^~ shoes.cpp: In function 'long long int count_swaps(std::vector<int>)': shoes.cpp:62:21: error: no matching function for call to 'fen<long long int>::fen(ll)' 62 | fen<ll> tree(2 * n); | ^ shoes.cpp:7:8: note: candidate: 'constexpr fen<long long int>::fen()' 7 | struct fen { | ^~~ shoes.cpp:7:8: note: candidate expects 0 arguments, 1 provided shoes.cpp:7:8: note: candidate: 'constexpr fen<long long int>::fen(const fen<long long int>&)' shoes.cpp:7:8: note: no known conversion for argument 1 from 'll' {aka 'long long int'} to 'const fen<long long int>&' shoes.cpp:7:8: note: candidate: 'constexpr fen<long long int>::fen(fen<long long int>&&)' shoes.cpp:7:8: note: no known conversion for argument 1 from 'll' {aka 'long long int'} to 'fen<long long int>&&' shoes.cpp:71: note: '-Wmisleading-indentation' is disabled from this point onwards, since column-tracking was disabled due to the size of the code/headers shoes.cpp:70:1: error: expected '}' at end of input 70 | } | ^ shoes.cpp:34:43: note: to match this '{' 34 | long long count_swaps(std::vector<int> s) { | ^ shoes.cpp:39:40: warning: control reaches end of non-void function [-Wreturn-type] 39 | vector<vector<ll>> pos(n, vector<ll>()), neg(n, vector<ll>()); | ^