# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
824778 | 2023-08-14T09:59:04 Z | andrei_boaca | 사탕 분배 (IOI21_candies) | C++17 | 87 ms | 12960 KB |
#include "candies.h" #include <bits/stdc++.h> #include <vector> //#include "grader.cpp" using namespace std; int n,q; vector<int> v; std::vector<int> distribute_candies(std::vector<int> c, std::vector<int> stanga,std::vector<int> dreapta, std::vector<int> vals) { n = c.size(); q=stanga.size(); v.resize(n); if(n<=2000&&q<=2000) { for(int z=0;z<stanga.size();z++) { int l=stanga[z]; int r=dreapta[z]; int val=vals[z]; for(int i=l;i<=r;i++) { v[i]+=val; if(v[i]<0) v[i]=0; if(v[i]>c[i]) v[i]=c[i]; } } return v; } return v; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 340 KB | Output is correct |
4 | Correct | 1 ms | 312 KB | Output is correct |
5 | Correct | 2 ms | 368 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 87 ms | 12960 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Incorrect | 63 ms | 8016 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Incorrect | 42 ms | 7648 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 340 KB | Output is correct |
4 | Correct | 1 ms | 312 KB | Output is correct |
5 | Correct | 2 ms | 368 KB | Output is correct |
6 | Incorrect | 87 ms | 12960 KB | Output isn't correct |
7 | Halted | 0 ms | 0 KB | - |