結果
| 問題 |
No.3137 Non-Intersect Chord Triangle Game
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-05-02 23:00:46 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 1,184 bytes |
| コンパイル時間 | 3,207 ms |
| コンパイル使用メモリ | 284,788 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-05-02 23:00:54 |
| 合計ジャッジ時間 | 7,697 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | TLE * 1 -- * 64 |
ソースコード
// #include <bits/allocator.h> // Temp fix for gcc13 global pragma
// #pragma GCC target("avx2,bmi2,popcnt,lzcnt")
// #pragma GCC optimize("O3,unroll-loops")
#include <bits/stdc++.h>
// #include <x86intrin.h>
using namespace std;
#if __cplusplus >= 202002L
using namespace numbers;
#endif
#ifdef LOCAL
#include "Debug.h"
#else
#define debug_endl() 42
#define debug(...) 42
#define debug2(...) 42
#define debug_bin(...) 42
#endif
int main(){
cin.tie(0)->sync_with_stdio(0);
cin.exceptions(ios::badbit | ios::failbit);
int n, m;
cin >> n >> m;
vector<int> level(n), p(n, -1);
for(auto i = 0; i < m; ++ i){
int u, v;
cin >> u >> v, -- u, -- v;
if(u > v){
swap(u, v);
}
p[u] = v;
p[v] = u;
level[u] = level[v] = -1;
}
vector<vector<int>> g;
vector<int> stack;
for(auto u = 0; u < n; ++ u){
if(~p[u] && p[u] < u){
auto it = ranges::find(stack, p[u]);
g.push_back(vector<int>(it + 1, stack.end()));
stack.erase(it, stack.end());
}
else{
stack.push_back(u);
}
}
if(!stack.empty()){
g.push_back(stack);
}
for(auto t: g){
if((int)t.size() % 4 == 2){
cout << "Akane\n";
return 0;
}
}
cout << "Aoi\n";
return 0;
}
/*
*/