Submission #74671192
Source Code Expand
#include<iostream>
using namespace std;
const int N=2e5+10;
int a[11], b[11];
string s[N];
#include<vector>
vector <string> v[N];
int main(){
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
int n, m;
cin>>n;
for(int i=0; i<n; ++i)
cin>>a[i]>>b[i];
cin>>m;
for(int i=0; i<m; ++i){
cin>>s[i];
for(int j=0; j<n; ++j)
if(s[i].size()==a[j]) v[j].emplace_back(s[i]);
}
for(int i=0; i<m; ++i){
int len=s[i].size();
if(len==n){
bool f=0;
for(int j=0; j<n; ++j){
b[j]--;
f=0;
for(auto t : v[j]){
if(t[b[j]]==s[i][b[j]]){
f=1; break;
}
}
if(!f) break;
}
if(f) cout<<"Yes\n";
else cout<<"No\n";
}else cout<<"No\n";
}
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | C - Fishbones |
| User | Wendynmm |
| Language | C++23 (GCC 15.2.0) |
| Score | 0 |
| Code Size | 963 Byte |
| Status | WA |
| Exec Time | > 2000 ms |
| Memory | 72660 KiB |
Compile Error
./Main.cpp: In function 'int main()':
./Main.cpp:19:27: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
19 | if(s[i].size()==a[j]) v[j].emplace_back(s[i]);
| ~~~~~~~~~~~^~~~~~
Judge Result
| Set Name | Sample | All | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 0 / 300 | ||||||||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00-sample-01.txt, 00-sample-02.txt |
| All | 00-sample-01.txt, 00-sample-02.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 01-10.txt, 01-11.txt, 01-12.txt, 01-13.txt, 01-14.txt, 01-15.txt, 01-16.txt, 01-17.txt, 01-18.txt, 01-19.txt, 01-20.txt, 01-21.txt, 01-22.txt, 01-23.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00-sample-01.txt | WA | 5 ms | 9888 KiB |
| 00-sample-02.txt | AC | 5 ms | 9848 KiB |
| 01-01.txt | WA | 6 ms | 10084 KiB |
| 01-02.txt | WA | 38 ms | 10468 KiB |
| 01-03.txt | WA | 1125 ms | 12200 KiB |
| 01-04.txt | WA | 589 ms | 11124 KiB |
| 01-05.txt | WA | 1471 ms | 15644 KiB |
| 01-06.txt | WA | 1064 ms | 15340 KiB |
| 01-07.txt | TLE | > 2000 ms | 66076 KiB |
| 01-08.txt | TLE | > 2000 ms | 72512 KiB |
| 01-09.txt | WA | 48 ms | 10280 KiB |
| 01-10.txt | WA | 965 ms | 13256 KiB |
| 01-11.txt | WA | 52 ms | 10412 KiB |
| 01-12.txt | TLE | > 2000 ms | 16032 KiB |
| 01-13.txt | WA | 1371 ms | 15144 KiB |
| 01-14.txt | WA | 750 ms | 13580 KiB |
| 01-15.txt | TLE | > 2000 ms | 65980 KiB |
| 01-16.txt | TLE | > 2000 ms | 72548 KiB |
| 01-17.txt | TLE | > 2000 ms | 72512 KiB |
| 01-18.txt | TLE | > 2000 ms | 72484 KiB |
| 01-19.txt | TLE | > 2000 ms | 72372 KiB |
| 01-20.txt | TLE | > 2000 ms | 72660 KiB |
| 01-21.txt | TLE | > 2000 ms | 72464 KiB |
| 01-22.txt | TLE | > 2000 ms | 72528 KiB |
| 01-23.txt | TLE | > 2000 ms | 72656 KiB |