結果
| 問題 | No.3637 PANDORA |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-08-26 00:47:19 |
| 言語 | C++23(gcc16) (gcc 16.1.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 3,309 bytes |
| 記録 | |
| コンパイル時間 | 4,809 ms |
| コンパイル使用メモリ | 333,256 KB |
| 実行使用メモリ | 10,112 KB |
| 最終ジャッジ日時 | 2026-08-26 00:47:30 |
| 合計ジャッジ時間 | 8,678 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| サブタスク | 配点 | 結果 |
|---|---|---|
| サンプル | 0 % | AC * 2 |
| 小課題1 | 5 % | WA * 4 |
| 小課題2 | 10 % | AC * 2 TLE * 1 -- * 1 |
| 小課題3 | 5 % | AC * 2 TLE * 1 -- * 5 |
| 小課題4 | 10 % | -- * 5 |
| 小課題5 | 20 % | -- * 10 |
| 小課題6 | 20 % | AC * 2 TLE * 1 -- * 13 |
| 小課題7 | 30 % | AC * 4 WA * 4 TLE * 1 -- * 29 |
| 合計 | 0 点 |
コンパイルメッセージ
In file included from main.cpp:6:
/home/linuxbrew/.linuxbrew/Cellar/gcc/16.1.0/include/c++/16/ciso646:49:6: warning: #warning "<ciso646> is not a standard header since C++20, use <version> to detect implementation-specific macros" [-Wcpp]
49 | # warning "<ciso646> is not a standard header since C++20, use <version> to detect implementation-specific macros"
| ^~~~~~~
In file included from main.cpp:18:
/home/linuxbrew/.linuxbrew/Cellar/gcc/16.1.0/include/c++/16/ccomplex:51:4: warning: #warning "<ccomplex> is deprecated in C++17, use <complex> instead" [-Wcpp]
51 | # warning "<ccomplex> is deprecated in C++17, use <complex> instead"
| ^~~~~~~
In file included from main.cpp:21:
/home/linuxbrew/.linuxbrew/Cellar/gcc/16.1.0/include/c++/16/cstdalign:50:6: warning: #warning "<cstdalign> is deprecated in C++17, remove the #include" [-Wcpp]
50 | # warning "<cstdalign> is deprecated in C++17, remove the #include"
| ^~~~~~~
In file included from main.cpp:22:
/home/linuxbrew/.linuxbrew/Cellar/gcc/16.1.0/include/c++/16/cstdbool:50:6: warning: #warning "<cstdbool> is deprecated in C++17, remove the #include" [-Wcpp]
50 | # warning "<cstdbool> is deprecated in C++17, remove the #include"
| ^~~~~~~
In file included from main.cpp:24:
/home/linuxbrew/.linuxbrew/Cellar/gcc/16.1.0/include/c++/16/ctgmath:50:6: warning: #warning "<ctgmath> is deprecated in C++17, use <complex> or <cmath> instead" [-Wcpp]
50 | # warning "<ctgmath> is deprecated in C++17, use <complex> or <cmath> instead"
| ^~~~~~~
ソースコード
#include <inttypes.h>
#include <cassert>
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdalign>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
// #include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i, n) for(int i=0;i<(int)(n);i++)
#define pb push_back
#define pob pop_back
#define eb emplace_back
#define nall(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define yesno(a) cout<<(a?"YES\n":"NO\n")
#define accu accumulate
#define bs binary_search
#define lb lower_bound
#define ub upper_bound
#define yes cout<<"YES\n"
#define no cout<<"NO\n"
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template<class T> using pq = priority_queue<T>;
template<class T> using pqg = priority_queue<T, vector<T>, greater<T>>;
template<class T> using vec = vector<T>;
template<class T> using vv = vector<vector<T>>;
template<class T> using vvv = vector<vv<T>>;
const ll MOD = 998244353ll;
// const ll MOD = 1000000007ll;
void solve();
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout << fixed << setprecision(20);
int t = 1;
// cin >> t;
while (t--) solve();
return 0;
}
void solve(){
int N, Q;
string S;
cin >> N >> Q >> S;
array<set<int>, 26> A;
rep(i, 26) A[i].insert(N);
rep(i, N) A[S[i]-'a'].insert(i);
while (Q--){
int t;
cin >> t;
if (t == 1){
int i;
char c;
cin >> i >> c, i--;
A[S[i]-'a'].erase(i);
A[c-'a'].insert(i);
}
else{
string s;
int now = -1;
bool ok = true;
cin >> s;
for (char c : s){
now = *ub(nall(A[c-'a']), now);
if (now == N){
ok = false;
break;
}
}
cout << (ok? "Yes": "No") << endl;
}
}
}