結果
問題 | No.2102 [Cherry Alpha *] Conditional Reflection |
ユーザー | |
提出日時 | 2022-10-15 00:26:25 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 3,096 bytes |
コンパイル時間 | 1,607 ms |
コンパイル使用メモリ | 126,564 KB |
実行使用メモリ | 15,616 KB |
最終ジャッジ日時 | 2024-06-26 18:30:25 |
合計ジャッジ時間 | 39,051 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
10,552 KB |
testcase_01 | AC | 2 ms
5,376 KB |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | AC | 285 ms
8,704 KB |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | AC | 199 ms
7,040 KB |
testcase_18 | AC | 401 ms
9,856 KB |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | WA | - |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | WA | - |
testcase_36 | WA | - |
testcase_37 | WA | - |
testcase_38 | WA | - |
testcase_39 | WA | - |
testcase_40 | WA | - |
testcase_41 | WA | - |
testcase_42 | AC | 611 ms
12,160 KB |
testcase_43 | AC | 613 ms
12,160 KB |
testcase_44 | AC | 628 ms
12,160 KB |
testcase_45 | AC | 574 ms
12,032 KB |
testcase_46 | AC | 607 ms
12,160 KB |
testcase_47 | AC | 350 ms
8,576 KB |
testcase_48 | AC | 346 ms
8,576 KB |
testcase_49 | AC | 355 ms
8,576 KB |
testcase_50 | AC | 355 ms
8,576 KB |
testcase_51 | AC | 349 ms
8,704 KB |
testcase_52 | AC | 29 ms
5,420 KB |
testcase_53 | AC | 30 ms
5,424 KB |
testcase_54 | AC | 29 ms
5,420 KB |
testcase_55 | AC | 81 ms
5,376 KB |
testcase_56 | AC | 81 ms
5,376 KB |
testcase_57 | AC | 81 ms
5,376 KB |
testcase_58 | TLE | - |
testcase_59 | -- | - |
testcase_60 | -- | - |
testcase_61 | -- | - |
testcase_62 | -- | - |
testcase_63 | -- | - |
testcase_64 | -- | - |
testcase_65 | -- | - |
testcase_66 | -- | - |
testcase_67 | -- | - |
testcase_68 | -- | - |
testcase_69 | -- | - |
ソースコード
#include <cstdio> #include <cstdint> #include <cmath> #include <cstring> #include <iostream> #include <iomanip> #include <vector> #include <map> #include <unordered_map> #include <set> #include <unordered_set> #include <queue> #include <algorithm> #include <numeric> #include <cassert> using namespace std; namespace atcoder{};using namespace atcoder; using ull = uint64_t; using ll = int64_t; using vi = vector<int>; using vll = vector<ll>; using vs = vector<string>; using ld = long double; using P = pair<ll,ll>; using G = vector<vector<int>>; #ifdef MYDEBUG template<class C> string join(const C& c){stringstream ss; for(auto it=c.begin(); it!=c.end();it++){ss << *it;if(it!=c.end())ss<<", ";}return ss.str();} template<class C> ostream &operator<<(ostream &os, const vector<C>& c){for(auto it=c.begin(); it!=c.end();it++){os << *it;if(it!=c.end())os<<", ";}return os;} #define LO(...) fprintf(stderr, __VA_ARGS__) #define debug(x) cerr << "\033[33m(line:" << __LINE__ << ") " << #x << ": " << x << "\033[m" << endl #else #define LO(...) (void)0 #define debug(x) (void)0 #endif #define reps(i,a,n) for(ll i##_len = (ll)(n), i = (a); i < i##_len; ++i) #define rep(i,n) reps(i,0,n) #define rrep(i,n) reps(i,1,n+1) #define repd(i,n) for(ll i=n-1;i>=0;i--) #define rrepd(i,n) for(ll i=n;i>=1;i--) #define inp(i) ll i; cin >> i; #define inps(s) string s; cin >> s; #define inpp(p) cin >> (p).first >> (p).second #define inpv(v,N) vll v(N);rep(i,N)cin>>v[i]; #define inpg(g,N,M) g.resize(N);rep(i,M){inp(a);inp(b);a--,b--;g[a].push_back(b);g[b].push_back(a);} #define all(v) begin(v),end(v) #define YESNO(b) cout<<(b?"YES\n":"NO\n") #define yesno(b) cout<<(b?"yes\n":"no\n") #define YesNo(b) cout<<(b?"Yes\n":"No\n") #define YES cout<<"YES\n" #define NO cout<<"NO\n" #define yes cout<<"yes\n" #define no cout<<"no\n" #define Yes cout<<"Yes\n" #define No cout<<"No\n" #define SP cout << " " #define ENDL cout << "\n" #define ou(i) cout << (i) #define ous(i) cout << (i) << " " #define oul(i) cout << (i) << "\n" #define setfp() cout << fixed << setprecision(16) template<typename C> void ouv(const C &v){for(auto &&e:v){cout << e;if(&e != &v.back()) cout << ' ';}cout << "\n";} template<typename C> void ouvadd(const C &v){for(auto &&e:v){cout << e+1;if(&e != &v.back()) cout << ' ';}cout << "\n";} template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; } inline ll lg(ll __n) { return sizeof(ll) * __CHAR_BIT__ - 1 - __builtin_clzl(__n); } int dx[8]={1,0,-1,0,1,-1,-1,1}; int dy[8]={0,1,0,-1,1,1,-1,-1}; constexpr ll INF = 1e18; int main(){ inp(N); set<string> a; rep(i,N){ inps(S); if(a.count(S)){ Yes; continue; } ll k = S.size(); bool ok = 0; rep(j,k-1){ swap(S[j], S[j+1]); if(a.count(S)){ ok=1; break; } swap(S[j], S[j+1]); } a.insert(S); YesNo(ok); } return 0; }