fork(1) download
  1.  
  2.  
  3. | In English По-русски
  4. zawahrah | Logout
  5.  
  6. HOME
  7. CONTESTS
  8. GYM
  9. PROBLEMSET
  10. GROUPS
  11. RATING
  12. API
  13. RCC
  14. VK CUP
  15. HFT BATTLE
  16.  
  17. PROBLEMSSUBMITSTATUSSTANDINGSCUSTOM TEST
  18. friends only
  19.  
  20. Contest status
  21.  
  22. # When Who Problem Lang Verdict Time Memory
  23. 28376278 2017-07-08 23:58:05 zawahrah 580B - Kefa and Company GNU C++14 Wrong answer on test 1 0 ms 1900 KB
  24. 28376275 2017-07-08 23:57:22 karimconan 611C - New Year and Domino GNU C++14 Accepted 265 ms 4200 KB
  25. 28376274 2017-07-08 23:56:36 ariana989800:43 713A - Sonya and Queries Java 8 Accepted 327 ms 20200 KB
  26. 28376273 2017-07-08 23:56:29 MeiTen 816B - Karen and Coffee GNU C++14 Accepted 873 ms 8100 KB
  27. 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
  28. 28376271 2017-07-08 23:56:01 ayaabdo729 709A - Juicer GNU C++11 Accepted 77 ms 2400 KB
  29. 28376269 2017-07-08 23:55:49 Dragon_162 349A - Cinema Line GNU C++14 Accepted 496 ms 2300 KB
  30. 28376265 2017-07-08 23:55:13 ahmadlolo 1A - Theatre Square MS C++ Accepted 46 ms 2000 KB
  31. 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
  32. 28376261 2017-07-08 23:54:48 ok1488 339A - Helpful Maths MS C++ Idleness limit exceeded on test 1 0 ms 0 KB
  33. 28376260 2017-07-08 23:54:41 Ozma 817A - Treasure Hunt GNU C++14 Wrong answer on test 1 15 ms 1900 KB
  34. 28376259 2017-07-08 23:54:40 gowikel 1A - Theatre Square Python 3 Runtime error on test 1 62 ms 4500 KB
  35. 28376258 2017-07-08 23:53:52 saratovdzd 96A - Football Python 3 Wrong answer on test 2 92 ms 4500 KB
  36. 28376257 2017-07-08 23:53:42 ok1488 339A - Helpful Maths GNU C++11 Compilation error 0 ms 0 KB
  37. 28376255 2017-07-08 23:53:32 gowikel 1A - Theatre Square Python 3 Runtime error on test 1 46 ms 5400 KB
  38. 28376253 2017-07-08 23:53:08 ayaabdo729 709A - Juicer GNU C++11 Wrong answer on test 7 62 ms 2400 KB
  39. 28376252 2017-07-08 23:52:47 ahmadlolo 1A - Theatre Square MS C++ Wrong answer on test 9 31 ms 2000 KB
  40. 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
  41. 28376250 2017-07-08 23:52:42 mmoselhy 115A - Party GNU C++11 Accepted 62 ms 2100 KB
  42. 28376249 2017-07-08 23:52:42 AK7 37A - Towers MS C++ Accepted 30 ms 2000 KB
  43. 28376247 2017-07-08 23:52:17 saratovdzd 96A - Football Python 3 Wrong answer on test 1 62 ms 4500 KB
  44. 28376246 2017-07-08 23:52:17 860579 814C - An impassioned circulation of affection GNU C++11 Accepted 1028 ms 7000 KB
  45. 28376243 2017-07-08 23:52:02 860579 814B - An express train to reveries GNU C++11 Accepted 30 ms 2300 KB
  46. 28376242 2017-07-08 23:51:49 860579 814A - An abandoned sentiment from past GNU C++11 Accepted 15 ms 2200 KB
  47. 28376238 2017-07-08 23:51:39 Dragon_162 349A - Cinema Line GNU C++14 Wrong answer on test 8 30 ms 2300 KB
  48. 28376236 2017-07-08 23:51:26 khaledm.salem 1A - Theatre Square MS C++ Accepted 15 ms 2000 KB
  49. 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
  50. 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
  51. 28376233 2017-07-08 23:50:59 ahmedtamer 50A - Domino piling MS C++ Accepted 30 ms 2000 KB
  52. 28376232 2017-07-08 23:50:50 helios1111 822D - My pretty girl Noora Python 2 Compilation error 0 ms 0 KB
  53. 28376231 2017-07-08 23:50:33 test08 778A - String Game FPC Time limit exceeded on test 42 2000 ms 3600 KB
  54. 28376230 2017-07-08 23:50:33 HananM 427A - Police Recruits Java 8 Accepted 280 ms 20500 KB
  55. 28376229 2017-07-08 23:50:11 860579 814E - An unavoidable detour for home GNU C++11 Accepted 967 ms 145500 KB
  56. 28376228 2017-07-08 23:50:06 Yousef_Salama00:23 477A - Dreamoon and Sums GNU C++14 Accepted 342 ms 1900 KB
  57. 28376227 2017-07-08 23:50:03 test08 778A - String Game FPC Wrong answer on test 10 62 ms 3500 KB
  58. 28376226 2017-07-08 23:49:59 Ozma 817A - Treasure Hunt GNU C++14 Wrong answer on test 1 0 ms 1900 KB
  59. 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
  60. 28376224 2017-07-08 23:49:51 AngelRA 118A - String Task GNU C++ Accepted 30 ms 2100 KB
  61. 28376222 2017-07-08 23:49:23 govind53 701C - They Are Everywhere GNU C++14 Accepted 15 ms 2100 KB
  62. 28376220 2017-07-08 23:49:12 Brimix 633A - Ebony and Ivory GNU C++14 Accepted 31 ms 1900 KB
  63. 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
  64. 28376217 2017-07-08 23:48:57 coin 161D - Distance in Tree GNU C++11 Accepted 560 ms 213400 KB
  65. 28376215 2017-07-08 23:48:40 kajuszpawlowski 71A - Way Too Long Words GNU C++14 Accepted 30 ms 1900 KB
  66. 28376214 2017-07-08 23:48:24 Korrot 820B - Mister B and Angle in Polygon GNU C++11 Accepted 15 ms 2900 KB
  67. 28376213 2017-07-08 23:48:23 coin 161D - Distance in Tree GNU C++11 Wrong answer on test 3 30 ms 2100 KB
  68. 28376212 2017-07-08 23:47:51 gasin 818F - Level Generation GNU C++14 Accepted 109 ms 1900 KB
  69. 28376211 2017-07-08 23:47:46 Saleh.ElHadidy 116A - Tram Java 8 Accepted 280 ms 20100 KB
  70. 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
  71. 28376209 2017-07-08 23:47:31 .joKer. 556A - Case of the Zeros and Ones GNU C++11 Accepted 46 ms 2500 KB
  72. 28376208 2017-07-08 23:47:29 OwezmyradowR 158B - Taxi FPC Wrong answer on test 37 30 ms 2000 KB
  73. 1 2 3 4 5
  74.  
  75. Codeforces (c) Copyright 2010-2017 Mike Mirzayanov
  76. The only programming contests Web 2.0 platform
  77. Server time: Jul/08/2017 23:58:06 (c4).
  78. Mobile version, switch to desktop version.
  79. Privacy Policy
  80. By zawahrah, contest: Codeforces Round #321 (Div. 2), problem: (B) Kefa and Company, Wrong answer on test 1, #
  81. #include <bits/stdc++.h>
  82. using namespace std;
  83. typedef long long int lli ;
  84. int main()
  85. {
  86. int n, d ;
  87. scanf("%d %d",&n,&d) ;
  88. vector<pair<lli, lli> > p(n) ;
  89.  
  90. for (int i = 0 ; i < n ; i ++)
  91. scanf("%lld %lld",&p[i].first,&p[i].second) ;
  92.  
  93.  
  94. sort(p.begin(), p.end()) ;
  95.  
  96. lli sum[n+1] ;
  97. sum[0] = 0 ;
  98.  
  99. for (int i = 1 ; i<=n ; i++)
  100. sum[i] = sum[i-1]+p[i-1].second ;
  101. int ans = 0 ;
  102. vector<int> mon(n) ;
  103. for (int i = 0 ; i <n ; i++)
  104. mon[i]= p[i].first;
  105. lli facsum = 0 ;
  106. for (int i = 0 ; i < n ; i ++)
  107. {
  108. int temp = (lower_bound(mon.begin()+i ,mon.end() , mon[i] +d) - mon.begin()) - 1 ;
  109. cout<<temp ;
  110. facsum = max(facsum , sum[temp+1]-sum[i] ) ;
  111. i = temp ;
  112. }
  113.  
  114. printf("%lld", facsum) ;
  115.  
  116. return 0;
  117. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
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
stdout
Standard output is empty