Submission #1202895

#TimeUsernameProblemLanguageResultExecution timeMemory
1202895zeta7532Magic Show (APIO24_show)C++20
5 / 100
2 ms384 KiB
#include <bits/stdc++.h> #pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") using namespace std; using ll = long long; const ll mod = 998244353; #define fi first #define se second #define rep(i,N) for(ll i=0;i<N;i++) #define all(A) A.begin(),A.end() #define faster ios::sync_with_stdio(false);cin.tie(nullptr) #include <vector> #include "Alice.h" // you may define some global variables, but it does not work if you try to transfer any information from function Alice() to function Bob() through these variables. // you had better not use the same global variables in function Alice() and in function Bob(). std::vector<std::pair<int,int>> Alice(){ // add your code here // change below into your code ll N=5000; ll X=setN(N); vector<pair<int,int>> ans; rep(i,N){ if(i+1!=X) ans.push_back({i+1,X}); } return ans; }
#include <bits/stdc++.h> #pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") using namespace std; using ll = long long; const ll mod = 998244353; #define fi first #define se second #define rep(i,N) for(ll i=0;i<N;i++) #define all(A) A.begin(),A.end() #define faster ios::sync_with_stdio(false);cin.tie(nullptr) #include <vector> #include "Bob.h" // you may define some global variables, but it does not work if you try to transfer any information from function Alice() to function Bob() through these variables. // you had better not use the same global variables in function Alice() and in function Bob(). long long Bob(std::vector<std::pair<int,int>> V){ // add your code here ll N=5000; vector<ll> deg(N,0); ll M=V.size(); rep(i,M){ deg[V[i].fi-1]++; deg[V[i].se-1]++; } ll ans=-1,val=-1; rep(i,N){ if(val<deg[i]){ ans=i; val=deg[i]; } } return ans+1; // change this into your code }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...