답안 #72041

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
72041 2018-08-26T04:53:56 Z BOJ 8481(#2179, veydpz, jh05013, 16silver) 코코넛 젤리 음료수 (FXCUP3_nectar) C++17
15 / 100
2000 ms 768 KB
#include <bits/stdc++.h>
#define dbgv(v) {for(auto x:v)cout<<x<<' ';cout<<'\n';}
#define entire(v) v.begin(),v.end()
typedef long long ll;
using namespace std;
void OJize(){
    cin.tie(NULL); ios_base::sync_with_stdio(false);
    #ifdef jh
    freopen("input.txt", "r", stdin);
    #endif
}

int main(){OJize();
    int n, j, r, t; cin>>n>>j>>r>>t;
    vector<int> drink(n, j);
    for(int time=0; time<t; time++){
        for(int i=n-2; i>=0; i--){
            int movedown = drink[i]/r;
            if(drink[i]%r) movedown++;
            drink[i]-= movedown;
            drink[i+1]+= movedown;
        }
    }
    for(int x: drink) cout<<x<<'\n';
}
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 376 KB Output is correct
2 Correct 2 ms 468 KB Output is correct
3 Correct 2 ms 468 KB Output is correct
4 Correct 2 ms 520 KB Output is correct
5 Correct 2 ms 524 KB Output is correct
6 Correct 3 ms 584 KB Output is correct
7 Correct 14 ms 696 KB Output is correct
8 Correct 17 ms 700 KB Output is correct
9 Correct 17 ms 748 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 376 KB Output is correct
2 Correct 2 ms 468 KB Output is correct
3 Correct 2 ms 468 KB Output is correct
4 Correct 2 ms 520 KB Output is correct
5 Correct 2 ms 524 KB Output is correct
6 Correct 3 ms 584 KB Output is correct
7 Correct 14 ms 696 KB Output is correct
8 Correct 17 ms 700 KB Output is correct
9 Correct 17 ms 748 KB Output is correct
10 Execution timed out 2008 ms 768 KB Time limit exceeded
11 Halted 0 ms 0 KB -