# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
58256 | 2018-07-17 09:52:49 | sebinkim | Wild Boar (JOI18_wild_boar) | C++14 | 47 / 100 | 18046 ms | 165588 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 <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair <ll, ll> pll;
const ll sz = 10;
struct path{
ll s, e, v;
path() {}
path(ll _v, ll _s, ll _e) { s = _s, e = _e, v = _v; }
bool operator< (const path& p) const { return v > p.v; }
};
typedef vector <path> vp;
vp T[303030];
priority_queue <path> Q;
vp K[2020][2020];
vector <pll> V[2020];
bool chk[2020][2020];
ll L[101010];
ll n, m, k;
vp add(vp &a, vp &b)
{
vp ret, ans;
ll i, j, c1, c2;
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
컴파일 시 표준 에러 (stderr) 메시지
wild_boar.cpp: In function 'vp add(vp&, vp&)': wild_boar.cpp:46:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(i=1;i<ret.size();i++){ ~^~~~~~~~~~~ wild_boar.cpp:50:8: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(i < ret.size()){ ~~^~~~~~~~~~~~ wild_boar.cpp:57:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(a=1;a<ret.size();a++) if(ret[a].s != s1 && ret[a].e != e1) break; ~^~~~~~~~~~~ wild_boar.cpp:58:9: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(a < ret.size()) ans.push_back(ret[a]); ~~^~~~~~~~~~~~ wild_boar.cpp:60:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(a=1;a<ret.size();a++) if(ret[a].s != s2 && ret[a].e != e2) break; ~^~~~~~~~~~~ wild_boar.cpp:61:9: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(a < ret.size()) ans.push_back(ret[a]); ~~^~~~~~~~~~~~ wild_boar.cpp:67:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(a=1;a<ret.size();a++) if(ret[a].s != s) break; ~^~~~~~~~~~~ wild_boar.cpp:68:9: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(a < ret.size()) ans.push_back(ret[a]); ~~^~~~~~~~~~~~ wild_boar.cpp:70:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(a=1;a<ret.size();a++) if(ret[a].e != e) break; ~^~~~~~~~~~~ wild_boar.cpp:71:9: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(a < ret.size()) ans.push_back(ret[a]); ~~^~~~~~~~~~~~ wild_boar.cpp:30:8: warning: unused variable 'j' [-Wunused-variable] ll i, j, c1, c2; ^ wild_boar.cpp:30:11: warning: unused variable 'c1' [-Wunused-variable] ll i, j, c1, c2; ^~ wild_boar.cpp:30:15: warning: unused variable 'c2' [-Wunused-variable] ll i, j, c1, c2; ^~ wild_boar.cpp: In function 'void init_seg(ll, ll, ll)': wild_boar.cpp:113:22: warning: suggest parentheses around '+' inside '>>' [-Wparentheses] init_seg(p<<1, s, (s+e>>1)); ~^~ wild_boar.cpp:114:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses] init_seg(p<<1|1, (s+e>>1)+1, e); ~^~ wild_boar.cpp: In function 'void update(ll, ll, ll, ll)': wild_boar.cpp:126:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses] if(v <= (s+e>>1)) update(p<<1, s, (s+e>>1), v); ~^~ wild_boar.cpp:126:38: warning: suggest parentheses around '+' inside '>>' [-Wparentheses] if(v <= (s+e>>1)) update(p<<1, s, (s+e>>1), v); ~^~ wild_boar.cpp:127:24: warning: suggest parentheses around '+' inside '>>' [-Wparentheses] else update(p<<1|1, (s+e>>1)+1, e, v); ~^~ wild_boar.cpp: In function 'int main()': wild_boar.cpp:159:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(a=1;a<ret.size();a++){ ~^~~~~~~~~~~ wild_boar.cpp:163:9: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(a < ret.size()){ ~~^~~~~~~~~~~~ wild_boar.cpp:169:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(a=1;a<ret.size();a++) if(ret[a].s != s1 && ret[a].e != e1) break; ~^~~~~~~~~~~ wild_boar.cpp:170:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(a < ret.size()) ans.push_back(ret[a]); ~~^~~~~~~~~~~~ wild_boar.cpp:172:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(a=1;a<ret.size();a++) if(ret[a].s != s2 && ret[a].e != e2) break; ~^~~~~~~~~~~ wild_boar.cpp:173:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(a < ret.size()) ans.push_back(ret[a]); ~~^~~~~~~~~~~~ wild_boar.cpp:178:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(a=1;a<ret.size();a++) if(ret[a].s != s) break; ~^~~~~~~~~~~ wild_boar.cpp:179:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(a < ret.size()) ans.push_back(ret[a]); ~~^~~~~~~~~~~~ wild_boar.cpp:181:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(a=1;a<ret.size();a++) if(ret[a].e != e) break; ~^~~~~~~~~~~ wild_boar.cpp:182:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(a < ret.size()) ans.push_back(ret[a]); ~~^~~~~~~~~~~~ wild_boar.cpp:137:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%lld%lld%lld%lld", &n, &m, &q, &k); ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ wild_boar.cpp:140:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%lld%lld%lld", &a, &b, &c); ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ wild_boar.cpp:190:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%lld", L+i); ~~~~~^~~~~~~~~~~~~ wild_boar.cpp:196:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%lld%lld", &a, &b); ~~~~~^~~~~~~~~~~~~~~~~~~~
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |