# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
84027 | tjdgus4384 | 방 배정 (KOI16_room) | C++14 | 3 ms | 976 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<cstdio>
#include<vector>
using namespace std;
int st[2][7];
int main()
{
int n, k, s, y;
scanf("%d %d", &n, &k);
for(int i = 0;i < n;i++)
{
scanf("%d %d", &s, &y);
st[s][y]++;
}
int ans = 0;
ans += (st[0][1] + st[0][2] + st[1][1] + st[1][2] + k - 1) / k;
ans += (st[0][3] + st[0][4] + k - 1) / k;
ans += (st[1][3] + st[1][4] + k - 1) / k;
ans += (st[0][5] + st[0][6] + k - 1) / k;
ans += (st[1][5] + st[1][6] + k - 1) / k;
printf("%d", ans);
return 0;
}
Compilation message (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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |