| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1364274 | mythofys | Second Run (KAISTRUN26SPRING_A) | C++20 | 33 ms | 11724 KiB |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define inf 4000000000000000000
#define mod 998244353
#define siz 524288
struct A
{
ll x,y,z,w,k;
}d[100005];
vector < array < ll , 4 > > v[100005];
ll a[100005];
int main()
{
ll i,j,k,n,m;
scanf("%lld %lld",&n,&m);
for(i=1;i<=m;i++)
{
scanf("%lld %lld %lld %lld %lld",&d[i].x,&d[i].y,&d[i].z,&d[i].w,&d[i].k);
v[d[i].w].push_back({d[i].x,d[i].y,d[i].z,d[i].k});
}
for(i=1;i<=n;i++)
{
ll w[4] = {0,0,0,0};
for(j=0;j<v[i].size();j++)
{
w[(16 + v[i][j][3] - a[v[i][j][2]] - a[v[i][j][1]] - a[v[i][j][0]]) % 4]++;
}
for(j=0;j<4;j++)
{
if(w[j] >= v[i].size()/4)break;
}
a[i] = j;
printf("%lld ",a[i]);
}
}Compilation message (stderr)
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
