| In English По-русски zawahrah | Logout HOME CONTESTS GYM PROBLEMSET GROUPS RATING API RCC VK CUP HFT BATTLE PROBLEMSSUBMITSTATUSSTANDINGSCUSTOM TEST friends only Contest status # When Who Problem Lang Verdict Time Memory 28376278 2017-07-08 23:58:05 zawahrah 580B - Kefa and Company GNU C++14 Wrong answer on test 1 0 ms 1900 KB 28376275 2017-07-08 23:57:22 karimconan 611C - New Year and Domino GNU C++14 Accepted 265 ms 4200 KB 28376274 2017-07-08 23:56:36 ariana989800:43 713A - Sonya and Queries Java 8 Accepted 327 ms 20200 KB 28376273 2017-07-08 23:56:29 MeiTen 816B - Karen and Coffee GNU C++14 Accepted 873 ms 8100 KB 28376272 2017-07-08 23:56:07 I_am_Hokage 508B - Anton and currency you all know GNU C++11 Accepted 46 ms 3300 KB 28376271 2017-07-08 23:56:01 ayaabdo729 709A - Juicer GNU C++11 Accepted 77 ms 2400 KB 28376269 2017-07-08 23:55:49 Dragon_162 349A - Cinema Line GNU C++14 Accepted 496 ms 2300 KB 28376265 2017-07-08 23:55:13 ahmadlolo 1A - Theatre Square MS C++ Accepted 46 ms 2000 KB 28376263 2017-07-08 23:55:09 I_am_Hokage 508B - Anton and currency you all know GNU C++11 Wrong answer on test 1 0 ms 2000 KB 28376261 2017-07-08 23:54:48 ok1488 339A - Helpful Maths MS C++ Idleness limit exceeded on test 1 0 ms 0 KB 28376260 2017-07-08 23:54:41 Ozma 817A - Treasure Hunt GNU C++14 Wrong answer on test 1 15 ms 1900 KB 28376259 2017-07-08 23:54:40 gowikel 1A - Theatre Square Python 3 Runtime error on test 1 62 ms 4500 KB 28376258 2017-07-08 23:53:52 saratovdzd 96A - Football Python 3 Wrong answer on test 2 92 ms 4500 KB 28376257 2017-07-08 23:53:42 ok1488 339A - Helpful Maths GNU C++11 Compilation error 0 ms 0 KB 28376255 2017-07-08 23:53:32 gowikel 1A - Theatre Square Python 3 Runtime error on test 1 46 ms 5400 KB 28376253 2017-07-08 23:53:08 ayaabdo729 709A - Juicer GNU C++11 Wrong answer on test 7 62 ms 2400 KB 28376252 2017-07-08 23:52:47 ahmadlolo 1A - Theatre Square MS C++ Wrong answer on test 9 31 ms 2000 KB 28376251 2017-07-08 23:52:47 rohittiwari300700:23 719A - Vitya in the Countryside GNU C++14 Wrong answer on test 33 31 ms 1900 KB 28376250 2017-07-08 23:52:42 mmoselhy 115A - Party GNU C++11 Accepted 62 ms 2100 KB 28376249 2017-07-08 23:52:42 AK7 37A - Towers MS C++ Accepted 30 ms 2000 KB 28376247 2017-07-08 23:52:17 saratovdzd 96A - Football Python 3 Wrong answer on test 1 62 ms 4500 KB 28376246 2017-07-08 23:52:17 860579 814C - An impassioned circulation of affection GNU C++11 Accepted 1028 ms 7000 KB 28376243 2017-07-08 23:52:02 860579 814B - An express train to reveries GNU C++11 Accepted 30 ms 2300 KB 28376242 2017-07-08 23:51:49 860579 814A - An abandoned sentiment from past GNU C++11 Accepted 15 ms 2200 KB 28376238 2017-07-08 23:51:39 Dragon_162 349A - Cinema Line GNU C++14 Wrong answer on test 8 30 ms 2300 KB 28376236 2017-07-08 23:51:26 khaledm.salem 1A - Theatre Square MS C++ Accepted 15 ms 2000 KB 28376235 2017-07-08 23:51:04 helios1111 822D - My pretty girl Noora GNU C++11 Time limit exceeded on test 8 1500 ms 98600 KB 28376234 2017-07-08 23:51:02 I_am_Hokage 508B - Anton and currency you all know GNU C++11 Runtime error on test 27 46 ms 3300 KB 28376233 2017-07-08 23:50:59 ahmedtamer 50A - Domino piling MS C++ Accepted 30 ms 2000 KB 28376232 2017-07-08 23:50:50 helios1111 822D - My pretty girl Noora Python 2 Compilation error 0 ms 0 KB 28376231 2017-07-08 23:50:33 test08 778A - String Game FPC Time limit exceeded on test 42 2000 ms 3600 KB 28376230 2017-07-08 23:50:33 HananM 427A - Police Recruits Java 8 Accepted 280 ms 20500 KB 28376229 2017-07-08 23:50:11 860579 814E - An unavoidable detour for home GNU C++11 Accepted 967 ms 145500 KB 28376228 2017-07-08 23:50:06 Yousef_Salama00:23 477A - Dreamoon and Sums GNU C++14 Accepted 342 ms 1900 KB 28376227 2017-07-08 23:50:03 test08 778A - String Game FPC Wrong answer on test 10 62 ms 3500 KB 28376226 2017-07-08 23:49:59 Ozma 817A - Treasure Hunt GNU C++14 Wrong answer on test 1 0 ms 1900 KB 28376225 2017-07-08 23:49:53 I_am_Hokage 508B - Anton and currency you all know GNU C++11 Wrong answer on test 27 46 ms 3300 KB 28376224 2017-07-08 23:49:51 AngelRA 118A - String Task GNU C++ Accepted 30 ms 2100 KB 28376222 2017-07-08 23:49:23 govind53 701C - They Are Everywhere GNU C++14 Accepted 15 ms 2100 KB 28376220 2017-07-08 23:49:12 Brimix 633A - Ebony and Ivory GNU C++14 Accepted 31 ms 1900 KB 28376219 2017-07-08 23:49:09 acmabhi 822D - My pretty girl Noora Java 8 Time limit exceeded on test 1 1500 ms 59700 KB 28376217 2017-07-08 23:48:57 coin 161D - Distance in Tree GNU C++11 Accepted 560 ms 213400 KB 28376215 2017-07-08 23:48:40 kajuszpawlowski 71A - Way Too Long Words GNU C++14 Accepted 30 ms 1900 KB 28376214 2017-07-08 23:48:24 Korrot 820B - Mister B and Angle in Polygon GNU C++11 Accepted 15 ms 2900 KB 28376213 2017-07-08 23:48:23 coin 161D - Distance in Tree GNU C++11 Wrong answer on test 3 30 ms 2100 KB 28376212 2017-07-08 23:47:51 gasin 818F - Level Generation GNU C++14 Accepted 109 ms 1900 KB 28376211 2017-07-08 23:47:46 Saleh.ElHadidy 116A - Tram Java 8 Accepted 280 ms 20100 KB 28376210 2017-07-08 23:47:43 chen_young01 822C - Hacker, pack your bags! Java 8 Runtime error on test 15 483 ms 27500 KB 28376209 2017-07-08 23:47:31 .joKer. 556A - Case of the Zeros and Ones GNU C++11 Accepted 46 ms 2500 KB 28376208 2017-07-08 23:47:29 OwezmyradowR 158B - Taxi FPC Wrong answer on test 37 30 ms 2000 KB ← 1 2 3 4 5 → Codeforces (c) Copyright 2010-2017 Mike Mirzayanov The only programming contests Web 2.0 platform Server time: Jul/08/2017 23:58:06 (c4). Mobile version, switch to desktop version. Privacy Policy By zawahrah, contest: Codeforces Round #321 (Div. 2), problem: (B) Kefa and Company, Wrong answer on test 1, # #include <bits/stdc++.h> using namespace std; typedef long long int lli ; int main() { int n, d ; scanf("%d %d",&n,&d) ; vector<pair<lli, lli> > p(n) ; for (int i = 0 ; i < n ; i ++) scanf("%lld %lld",&p[i].first,&p[i].second) ; sort(p.begin(), p.end()) ; lli sum[n+1] ; sum[0] = 0 ; for (int i = 1 ; i<=n ; i++) sum[i] = sum[i-1]+p[i-1].second ; int ans = 0 ; vector<int> mon(n) ; for (int i = 0 ; i <n ; i++) mon[i]= p[i].first; lli facsum = 0 ; for (int i = 0 ; i < n ; i ++) { int temp = (lower_bound(mon.begin()+i ,mon.end() , mon[i] +d) - mon.begin()) - 1 ; cout<<temp ; facsum = max(facsum , sum[temp+1]-sum[i] ) ; i = temp ; } printf("%lld", facsum) ; return 0; }
Standard input is empty
prog.cpp:3: error: stray '\320' in program prog.cpp:3: error: stray '\237' in program prog.cpp:3: error: stray '\320' in program prog.cpp:3: error: stray '\276' in program prog.cpp:3: error: stray '\321' in program prog.cpp:3: error: stray '\200' in program prog.cpp:3: error: stray '\321' in program prog.cpp:3: error: stray '\203' in program prog.cpp:3: error: stray '\321' in program prog.cpp:3: error: stray '\201' in program prog.cpp:3: error: stray '\321' in program prog.cpp:3: error: stray '\201' in program prog.cpp:3: error: stray '\320' in program prog.cpp:3: error: stray '\272' in program prog.cpp:3: error: stray '\320' in program prog.cpp:3: error: stray '\270' in program prog.cpp:22:3: error: invalid preprocessing directive #When prog.cpp:23:18: error: invalid digit "8" in octal constant prog.cpp:23:39: error: invalid suffix "B" on integer constant prog.cpp:24:18: error: invalid digit "8" in octal constant prog.cpp:24:41: error: invalid suffix "C" on integer constant prog.cpp:25:18: error: invalid digit "8" in octal constant prog.cpp:25:46: error: invalid suffix "A" on integer constant prog.cpp:26:18: error: invalid digit "8" in octal constant prog.cpp:26:37: error: invalid suffix "B" on integer constant prog.cpp:27:18: error: invalid digit "8" in octal constant prog.cpp:27:42: error: invalid suffix "B" on integer constant prog.cpp:28:18: error: invalid digit "8" in octal constant prog.cpp:28:41: error: invalid suffix "A" on integer constant prog.cpp:29:18: error: invalid digit "8" in octal constant prog.cpp:29:41: error: invalid suffix "A" on integer constant prog.cpp:30:18: error: invalid digit "8" in octal constant prog.cpp:30:40: error: invalid suffix "A" on integer constant prog.cpp:31:18: error: invalid digit "8" in octal constant prog.cpp:31:27: error: invalid digit "9" in octal constant prog.cpp:31:42: error: invalid suffix "B" on integer constant prog.cpp:32:18: error: invalid digit "8" in octal constant prog.cpp:32:37: error: invalid suffix "A" on integer constant prog.cpp:33:18: error: invalid digit "8" in octal constant prog.cpp:33:35: error: invalid suffix "A" on integer constant prog.cpp:34:18: error: invalid digit "8" in octal constant prog.cpp:34:38: error: invalid suffix "A" on integer constant prog.cpp:35:18: error: invalid digit "8" in octal constant prog.cpp:35:41: error: invalid suffix "A" on integer constant prog.cpp:36:18: error: invalid digit "8" in octal constant prog.cpp:36:37: error: invalid suffix "A" on integer constant prog.cpp:37:18: error: invalid digit "8" in octal constant prog.cpp:37:38: error: invalid suffix "A" on integer constant prog.cpp:38:18: error: invalid digit "8" in octal constant prog.cpp:38:27: error: invalid digit "8" in octal constant prog.cpp:38:41: error: invalid suffix "A" on integer constant prog.cpp:39:18: error: invalid digit "8" in octal constant prog.cpp:39:40: error: invalid suffix "A" on integer constant prog.cpp:40:18: error: invalid digit "8" in octal constant prog.cpp:40:51: error: invalid suffix "A" on integer constant prog.cpp:41:18: error: invalid digit "8" in octal constant prog.cpp:41:39: error: invalid suffix "A" on integer constant prog.cpp:42:18: error: invalid digit "8" in octal constant prog.cpp:42:34: error: invalid suffix "A" on integer constant prog.cpp:43:18: error: invalid digit "8" in octal constant prog.cpp:43:41: error: invalid suffix "A" on integer constant prog.cpp:44:18: error: invalid digit "8" in octal constant prog.cpp:44:37: error: invalid suffix "C" on integer constant prog.cpp:45:18: error: invalid digit "8" in octal constant prog.cpp:45:37: error: invalid suffix "B" on integer constant prog.cpp:46:18: error: invalid digit "8" in octal constant prog.cpp:46:37: error: invalid suffix "A" on integer constant prog.cpp:47:18: error: invalid digit "8" in octal constant prog.cpp:47:41: error: invalid suffix "A" on integer constant prog.cpp:48:18: error: invalid digit "8" in octal constant prog.cpp:48:44: error: invalid suffix "A" on integer constant prog.cpp:49:18: error: invalid digit "8" in octal constant prog.cpp:49:41: error: invalid suffix "D" on integer constant prog.cpp:50:18: error: invalid digit "8" in octal constant prog.cpp:50:42: error: invalid suffix "B" on integer constant prog.cpp:51:18: error: invalid digit "8" in octal constant prog.cpp:51:41: error: invalid suffix "A" on integer constant prog.cpp:52:18: error: invalid digit "8" in octal constant prog.cpp:52:41: error: invalid suffix "D" on integer constant prog.cpp:53:18: error: invalid digit "8" in octal constant prog.cpp:53:37: error: invalid suffix "A" on integer constant prog.cpp:54:18: error: invalid digit "8" in octal constant prog.cpp:54:37: error: invalid suffix "A" on integer constant prog.cpp:55:18: error: invalid digit "8" in octal constant prog.cpp:55:37: error: exponent has no digits prog.cpp:56:18: error: invalid digit "8" in octal constant prog.cpp:56:49: error: invalid suffix "A" on integer constant prog.cpp:57:18: error: invalid digit "8" in octal constant prog.cpp:57:37: error: invalid suffix "A" on integer constant prog.cpp:58:18: error: invalid digit "8" in octal constant prog.cpp:58:35: error: invalid suffix "A" on integer constant prog.cpp:59:18: error: invalid digit "8" in octal constant prog.cpp:59:42: error: invalid suffix "B" on integer constant prog.cpp:60:18: error: invalid digit "8" in octal constant prog.cpp:60:38: error: invalid suffix "A" on integer constant prog.cpp:61:18: error: invalid digit "8" in octal constant prog.cpp:61:39: error: invalid suffix "C" on integer constant prog.cpp:62:18: error: invalid digit "8" in octal constant prog.cpp:62:37: error: invalid suffix "A" on integer constant prog.cpp:63:18: error: invalid digit "8" in octal constant prog.cpp:63:27: error: invalid digit "9" in octal constant prog.cpp:63:38: error: invalid suffix "D" on integer constant prog.cpp:64:18: error: invalid digit "8" in octal constant prog.cpp:64:35: error: invalid suffix "D" on integer constant prog.cpp:65:18: error: invalid digit "8" in octal constant prog.cpp:65:46: error: invalid suffix "A" on integer constant prog.cpp:66:18: error: invalid digit "8" in octal constant prog.cpp:66:37: error: invalid suffix "B" on integer constant prog.cpp:67:18: error: invalid digit "8" in octal constant prog.cpp:67:35: error: invalid suffix "D" on integer constant prog.cpp:68:18: error: invalid digit "8" in octal constant prog.cpp:68:36: error: invalid suffix "F" on integer constant prog.cpp:69:18: error: invalid digit "8" in octal constant prog.cpp:69:45: error: invalid suffix "A" on integer constant prog.cpp:70:18: error: invalid digit "8" in octal constant prog.cpp:70:43: error: invalid suffix "C" on integer constant prog.cpp:71:18: error: invalid digit "8" in octal constant prog.cpp:71:38: error: invalid suffix "A" on integer constant prog.cpp:72:18: error: invalid digit "8" in octal constant prog.cpp:72:43: error: invalid suffix "B" on integer constant prog.cpp:73: error: stray '\342' in program prog.cpp:73: error: stray '\206' in program prog.cpp:73: error: stray '\220' in program prog.cpp:73: error: stray '\342' in program prog.cpp:73: error: stray '\206' in program prog.cpp:73: error: stray '\222' in program prog.cpp:77:18: error: invalid digit "8" in octal constant prog.cpp:80: error: stray '#' in program prog.cpp:80: error: stray '#' in program prog.cpp:3: error: expected unqualified-id before '|' token
Standard output is empty