# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
84030 | 2018-11-12T12:51:54 Z | tjdgus4384 | 주유소 (KOI16_gasM) | C++14 | 25 ms | 2380 KB |
#include<cstdio> int d[100001], m[100001]; int main() { int n, s = 1000000000; scanf("%d", &n); for(int i = 1;i < n;i++) { scanf("%d", &d[i]); } for(int i = 0;i < n;i++) { scanf("%d", &m[i]); } int ans = 0; for(int i = 0;i < n;i++) { if(m[i] < s) s = m[i]; ans += s * d[i + 1]; } printf("%d", ans); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 25 ms | 1784 KB | Output is correct |
2 | Correct | 23 ms | 2380 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 2380 KB | Output is correct |
2 | Correct | 2 ms | 2380 KB | Output is correct |
3 | Correct | 2 ms | 2380 KB | Output is correct |
4 | Correct | 2 ms | 2380 KB | Output is correct |
5 | Correct | 2 ms | 2380 KB | Output is correct |
6 | Correct | 2 ms | 2380 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 25 ms | 1784 KB | Output is correct |
2 | Correct | 23 ms | 2380 KB | Output is correct |
3 | Correct | 3 ms | 2380 KB | Output is correct |
4 | Correct | 2 ms | 2380 KB | Output is correct |
5 | Correct | 2 ms | 2380 KB | Output is correct |
6 | Correct | 2 ms | 2380 KB | Output is correct |
7 | Correct | 2 ms | 2380 KB | Output is correct |
8 | Correct | 2 ms | 2380 KB | Output is correct |
9 | Incorrect | 2 ms | 2380 KB | Output isn't correct |
10 | Halted | 0 ms | 0 KB | - |