結果
| 問題 | No.3137 Non-Intersect Chord Triangle Game | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2025-05-02 23:01:35 | 
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 123 ms / 2,000 ms | 
| コード長 | 1,215 bytes | 
| コンパイル時間 | 4,042 ms | 
| コンパイル使用メモリ | 281,392 KB | 
| 実行使用メモリ | 23,184 KB | 
| 最終ジャッジ日時 | 2025-05-02 23:01:45 | 
| 合計ジャッジ時間 | 7,881 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 65 | 
ソースコード
// #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){
			vector<int> cur;
			while(stack.back() != p[u]){
				cur.push_back(stack.back());
				stack.pop_back();
			}
			stack.pop_back();
			g.push_back(cur);
		}
		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;
}
/*
*/
            
            
            
        