Submission #963335

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9633352024-04-14 21:00:13TimAniBitaro’s Party (JOI18_bitaro)C++17
100 / 100
1367 ms145840 KiB
//start-time: 2024-04-14 19:39:32
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int w = 100;
void solve(){
int n, m, q;
cin >> n >> m >> q;
vector<vector<int>> gR(n);
for(int i = 0; i < m; i++){
int u, v;
cin >> u >> v;
gR[v - 1].push_back(u - 1);
}
vector<vector<pair<int, int>>> dp(n);
vector<int> vis(n);
for(int u = 0; u < n; u++){
vector<int> val(n), cur;
for(auto &v : gR[u]){
for(auto &[value, ind] : dp[v]){
if(vis[ind] == u) val[ind] = max(val[ind], value + 1);
else vis[ind] = u, val[ind] = value + 1, cur.push_back(ind);
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...