Submission #1135009

#TimeUsernameProblemLanguageResultExecution timeMemory
1135009binminh01Stray Cat (JOI20_stray)C++20
15 / 100
31 ms13896 KiB
#include<bits/allocator.h> #pragma GCC optimize("Ofast,unroll-loops") #ifdef ONLINE_JUDGE #pragma GCC target("avx2,fma,bmi,bmi2,popcnt,lzcnt,tune=native") #endif #include<bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define int128 __int128_t #define double long double #define gcd __gcd #define lcm(a, b) ((a)/gcd(a, b)*(b)) #define sqrt sqrtl #define log2 log2l #define log10 log10l #define floor floorl #define to_string str #define yes cout << "YES" #define no cout << "NO" #define trav(i, a) for (auto &i: (a)) #define all(a) (a).begin(), (a).end() #define rall(a) (a).rbegin(), (a).rend() #define sz(a) (int)a.size() #define Max(a) *max_element(all(a)) #define Min(a) *min_element(all(a)) #define Find(a, n) (find(all(a), n) - a.begin()) #define Count(a, n) count(all(a), n) #define Upper(a, n) (upper_bound(all(a), n) - a.begin()) #define Lower(a, n) (lower_bound(all(a), n) - a.begin()) #define next_perm(a) next_permutation(all(a)) #define prev_perm(a) prev_permutation(all(a)) #define sorted(a) is_sorted(all(a)) #define sum(a) accumulate(all(a), 0) #define sumll(a) accumulate(all(a), 0ll) #define Sort(a) sort(all(a)) #define Reverse(a) reverse(all(a)) #define Unique(a) Sort(a), (a).resize(unique(all(a)) - a.begin()) #define pb push_back #define eb emplace_back #define popcount __builtin_popcount #define popcountll __builtin_popcountll #define clz __builtin_clz #define clzll __buitlin_clzll #define ctz __builtin_ctz #define ctzll __builtin_ctzll #define open(s) freopen(s, "r", stdin) #define write(s) freopen(s, "w", stdout) #define fileopen(s) open((string(s) + ".inp").c_str()), write((string(s) + ".out").c_str()); #define For(i, a, b) for (auto i = (a); i < (b); ++i) #define Fore(i, a, b) for (auto i = (a); i >= (b); --i) #define FOR(i, a, b) for (auto i = (a); i <= (b); ++i) #define ret(s) return void(cout << s); #include "Anthony.h" vector<int> Mark(int n, int m, int A, int B, vector<int> U, vector<int> V) { vector<vector<int>> g(n); For(i,0,m) g[U[i]].pb(V[i]), g[V[i]].pb(U[i]); vector<int> d(n, -1); queue<int> q; q.push(0); d[0] = 0; while (!q.empty()) { int u = q.front(); q.pop(); trav(v,g[u]){ if (d[v] == -1) d[v] = d[u] + 1, q.push(v); } } vector<int> w(m); if (A >= 3) { For(i,0,m) w[i] = min(d[U[i]], d[V[i]]) % 3; return w; } }
#include<bits/allocator.h> #pragma GCC optimize("Ofast,unroll-loops") #ifdef ONLINE_JUDGE #pragma GCC target("avx2,fma,bmi,bmi2,popcnt,lzcnt,tune=native") #endif #include<bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define int128 __int128_t #define double long double #define gcd __gcd #define lcm(a, b) ((a)/gcd(a, b)*(b)) #define sqrt sqrtl #define log2 log2l #define log10 log10l #define floor floorl #define to_string str #define yes cout << "YES" #define no cout << "NO" #define trav(i, a) for (auto &i: (a)) #define all(a) (a).begin(), (a).end() #define rall(a) (a).rbegin(), (a).rend() #define sz(a) (int)a.size() #define Max(a) *max_element(all(a)) #define Min(a) *min_element(all(a)) #define Find(a, n) (find(all(a), n) - a.begin()) #define Count(a, n) count(all(a), n) #define Upper(a, n) (upper_bound(all(a), n) - a.begin()) #define Lower(a, n) (lower_bound(all(a), n) - a.begin()) #define next_perm(a) next_permutation(all(a)) #define prev_perm(a) prev_permutation(all(a)) #define sorted(a) is_sorted(all(a)) #define sum(a) accumulate(all(a), 0) #define sumll(a) accumulate(all(a), 0ll) #define Sort(a) sort(all(a)) #define Reverse(a) reverse(all(a)) #define Unique(a) Sort(a), (a).resize(unique(all(a)) - a.begin()) #define pb push_back #define eb emplace_back #define popcount __builtin_popcount #define popcountll __builtin_popcountll #define clz __builtin_clz #define clzll __buitlin_clzll #define ctz __builtin_ctz #define ctzll __builtin_ctzll #define open(s) freopen(s, "r", stdin) #define write(s) freopen(s, "w", stdout) #define fileopen(s) open((string(s) + ".inp").c_str()), write((string(s) + ".out").c_str()); #define For(i, a, b) for (auto i = (a); i < (b); ++i) #define Fore(i, a, b) for (auto i = (a); i >= (b); --i) #define FOR(i, a, b) for (auto i = (a); i <= (b); ++i) #define ret(s) return void(cout << s); #include "Catherine.h" int A, B; void Init(int _A, int _B) { A = _A, B = _B; } int Move(vector<int> w) { if (A >= 3) { vector<int> a; For(i,0,3) if (w[i]) a.pb(i); if (sz(a) == 2 && a[0] == 0 && a[1] == 2) return 2; return a[0]; } }

Compilation message (stderr)

# 1번째 컴파일 단계

Anthony.cpp: In function 'std::vector<int> Mark(int, int, int, int, std::vector<int>, std::vector<int>)':
Anthony.cpp:73:1: warning: control reaches end of non-void function [-Wreturn-type]
   73 | }
      | ^

# 2번째 컴파일 단계

Catherine.cpp: In function 'int Move(std::vector<int>)':
Catherine.cpp:68:1: warning: control reaches end of non-void function [-Wreturn-type]
   68 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...