Submission #8584902


Source Code Expand

Copy
#include <bits/stdc++.h>

using namespace std;

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);

  int m;
  cin >> m;
  vector<int> d(m);
  vector<long long> c(m);
  long long ans = 0, s = 0;
  for (int i = 0; i < m; ++i) {
    cin >> d[i] >> c[i];
    ans += c[i];
    s += c[i] * d[i];
  }
  cout << ans -  1 + s / 10;

  return 0;
}

Submission Info

Submission Time
Task D - Digit Sum Replace
User achvanov
Language C++14 (GCC 5.4.1)
Score 0
Code Size 377 Byte
Status WA
Exec Time 34 ms
Memory 2560 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 500
Status
AC × 2
AC × 8
WA × 12
Set Name Test Cases
Sample 00-sample-01.txt, 00-sample-02.txt
All 00-sample-01.txt, 00-sample-02.txt, 01-corner-01.txt, 01-corner-02.txt, 01-corner-03.txt, 02-random-01.txt, 02-random-02.txt, 02-random-03.txt, 02-random-04.txt, 02-random-05.txt, 02-random-06.txt, 02-random-07.txt, 02-random-08.txt, 02-random-09.txt, 02-random-10.txt, 02-random-11.txt, 03-max-01.txt, 03-max-02.txt, 04-min-01.txt, 04-min-02.txt
Case Name Status Exec Time Memory
00-sample-01.txt AC 1 ms 256 KB
00-sample-02.txt AC 1 ms 256 KB
01-corner-01.txt AC 1 ms 256 KB
01-corner-02.txt AC 1 ms 256 KB
01-corner-03.txt AC 1 ms 256 KB
02-random-01.txt AC 1 ms 256 KB
02-random-02.txt WA 1 ms 256 KB
02-random-03.txt WA 1 ms 256 KB
02-random-04.txt AC 1 ms 256 KB
02-random-05.txt AC 1 ms 256 KB
02-random-06.txt WA 34 ms 2560 KB
02-random-07.txt WA 34 ms 2560 KB
02-random-08.txt WA 34 ms 2560 KB
02-random-09.txt WA 33 ms 2560 KB
02-random-10.txt WA 34 ms 2560 KB
02-random-11.txt WA 34 ms 2560 KB
03-max-01.txt WA 25 ms 1920 KB
03-max-02.txt WA 1 ms 256 KB
04-min-01.txt WA 27 ms 2048 KB
04-min-02.txt WA 1 ms 256 KB