# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
896140 | 2023-12-31T22:09:19 Z | vjudge1 | Happiness (Balkan15_HAPPINESS) | C++17 | 2000 ms | 6736 KB |
#include "happiness.h" #include<bits/stdc++.h> using namespace std; multiset<long long> st; bool init(int coinsCount, long long maxCoinSize, long long coins[]) { for(int i = 0; i < coinsCount; i++) st.insert(coins[i]); long long sum=0; for(auto i: st) if(sum+1<i) return 0; else sum+=i; return 1; } bool is_happy(int event, int coinsCount, long long coins[]) { for(int i = 0; i < coinsCount; i++) if(event<0) st.erase(st.find(coins[i])); else st.insert(coins[i]); long long sum=0; for(auto i: st) if(sum+1<i) return 0; else sum+=i; return 1; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 1 ms | 456 KB | Output is correct |
7 | Correct | 1 ms | 348 KB | Output is correct |
8 | Correct | 78 ms | 964 KB | Output is correct |
9 | Correct | 88 ms | 1168 KB | Output is correct |
10 | Correct | 94 ms | 1112 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Execution timed out | 2090 ms | 6736 KB | Time limit exceeded |
7 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 1 ms | 456 KB | Output is correct |
7 | Correct | 1 ms | 348 KB | Output is correct |
8 | Correct | 78 ms | 964 KB | Output is correct |
9 | Correct | 88 ms | 1168 KB | Output is correct |
10 | Correct | 94 ms | 1112 KB | Output is correct |
11 | Execution timed out | 2090 ms | 6736 KB | Time limit exceeded |
12 | Halted | 0 ms | 0 KB | - |