# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
899656 | Karoot | Ljeto (COCI21_ljeto) | C++17 | 1 ms | 604 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <cmath>
#include <unordered_map>
#include <map>
#include <set>
#include <queue>
#include <vector>
#include <string>
#include <iomanip>
#include <algorithm>
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
using namespace std;
typedef long long ll;
ll linf = 1e15+1;
inline void scoobydoobydoo(){
ios::sync_with_stdio(false);
ios_base::sync_with_stdio(false);
cin.tie(NULL); cout.tie(NULL);
}
vector<pair<int, int> > v[8];
int main(){
scoobydoobydoo();
int n; cin >> n;
for (int i = 0; i < n; i++){
int t, a, b; cin >> t >> a >> b;
a--; b--;
v[a].push_back({t, b});
}
int pineapple = 0, blueberries = 0;
for (int i = 0; i < 4; i++){
sort(all(v[i]));
pineapple += v[i].size()*100;
for (int j = 1; j < v[i].size(); j++)pineapple += (v[i][j].first <= v[i][j-1].first+10)*50;
}
for (int i = 4; i < 8; i++){
sort(all(v[i]));
blueberries += v[i].size()*100;
for (int j = 1; j < v[i].size(); j++)blueberries += (v[i][j].first <= v[i][j-1].first+10)*50;
}
cout << pineapple << " " << blueberries << endl;
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |