| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1304125 | nataliaa | 이주 (IOI25_migrations) | C++20 | 2 ms | 400 KiB |
#include "migrations.h"
#include<bits/stdc++.h>
using namespace std;
int val[10000], mx;
int send_message(int N, int i, int Pi) {
val[i] = val[Pi]+1;
mx = max(val[i], mx);
if(i>N-8&&mx == val[i]) return 4;
if(i>N-8) {
int k = mx%4;
mx/=4;
return k;
}
}
pair<int, int> longest_path(vector<int> S) {
int N = 10000;
pair<int, int> p;
p.first = 0;
p.second = 0;
for(int i =N-1; i>N-8; i--) {
if(S[i]==4) {
p.second = i;
return p;
}
}
int k = 1;
for(int i =N-7; i < N; i++) {
p.second += k*S[i];
k*=4;
}
return p;
}
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... | ||||
