# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1107553 | 8pete8 | Stray Cat (JOI20_stray) | C++17 | 44 ms | 16816 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 "Anthony.h"
#include <vector>
#include<iostream>
#include<stack>
#include<map>
#include<vector>
#include<string>
#include<cassert>
#include<unordered_map>
#include <queue>
#include <cstdint>
#include<cstring>
#include<limits.h>
#include<cmath>
#include<set>
#include<algorithm>
#include <iomanip>
#include<numeric>
#include<bitset>
using namespace std;
#define ll long long
#define f first
#define s second
#define pii pair<int,int>
#define ppii pair<int,pii>
#define vi vector<int>
#define pb push_back
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define F(n) for(int i=0;i<n;i++)
#define lb lower_bound
#define ub upper_bound
#define fastio ios::sync_with_stdio(false);cin.tie(NULL);
#pragma GCC optimize ("03,unroll-lopps")
using namespace std;
namespace {
int FunctionExample(int i, int A) {
return i % A;
}
int x=0;
} // namespace
vector<int> Mark(int n,int m, int a, int b,vector<int> U,vector<int> V) {
vector<int> X(m);
vector<int>lvl(n+1,1e9),vis(n,0);
vector<vector<pii>>adj(n);
for(int i=0;i<m;i++){
adj[U[i]].pb({V[i],i}),adj[V[i]].pb({U[i],i});
}
queue<int>q;
lvl[0]=0;
q.push(0);
while(!q.empty()){
int cur=q.front();
q.pop();
if(vis[cur])continue;
vis[cur]=1;
for(auto i:adj[cur])if(!vis[i.f]&&lvl[i.f]>lvl[cur]+1){
lvl[i.f]=lvl[cur]+1;
q.push(i.f);
}
}
if(a>=3){
for(int i=0;i<n;i++)for(auto j:adj[i]){
if(lvl[j.f]<lvl[i])X[j.s]=(lvl[j.f]%3);
else X[j.s]=lvl[i]%3;
}
}
return X;
}
#include "Catherine.h"
#include <vector>
#include<iostream>
#include<stack>
#include<map>
#include<vector>
#include<string>
#include<cassert>
#include<unordered_map>
#include <queue>
#include <cstdint>
#include<cstring>
#include<limits.h>
#include<cmath>
#include<set>
#include<algorithm>
#include <iomanip>
#include<numeric>
#include<bitset>
using namespace std;
#define ll long long
#define f first
#define s second
#define pii pair<int,int>
#define ppii pair<int,pii>
#define vi vector<int>
#define pb push_back
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define F(n) for(int i=0;i<n;i++)
#define lb lower_bound
#define ub upper_bound
#define fastio ios::sync_with_stdio(false);cin.tie(NULL);
#pragma GCC optimize ("03,unroll-lopps")
using namespace std;
using namespace std;
namespace {
int a, b;
int variable_example = 0;
}
void Init(int A, int B) {
::a = A;
::b = B;
}
int Move(vector<int> y){
if(a>=3){
int cnt=0;
for(auto i:y)cnt+=!!i;
if(cnt==0)assert(0);
if(cnt==1){
for(int i=0;i<y.size();i++)if(y[i])return i;
}
if(cnt==2){
if(y[0]&&y[2])return 2;
if(y[1]&&y[2])return 1;
if(y[0]&&y[1])return 0;
}
assert(0);
}
return -1;
}
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |