Submission #74686303
Source Code Expand
#include<bits/stdc++.h>
using namespace std;
int n,m,a[11],b[11];
string s[20001];
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cin>>n;
for(int i=1;i<=n;i++)cin>>a[i]>>b[i];
cin>>m;
for(int i=1;i<=m;i++)cin>>s[i];
for(int j=1;j<=m;j++){
if((int)s[j].size()!=n){
cout<<"No\n";
continue;
}
bool d=1;
for(int i=1;i<=n&&d;i++){
bool c=0;
for(int k=1;k<=m;k++){
if(k!=j&&s[k].size()==a[i]&&s[k][b[i]-1]==s[j][i-1]){
c=1;
break;
}
}
if(!c)d=0;
}
cout<<(d?"Yes":"No")<<'\n';
}
}
Submission Info
| Submission Time | |
|---|---|
| Task | C - Fishbones |
| User | ywrow |
| Language | C++23 (GCC 15.2.0) |
| Score | 0 |
| Code Size | 564 Byte |
| Status | RE |
| Exec Time | 90 ms |
| Memory | 4192 KiB |
Compile Error
./Main.cpp: In function 'int main()':
./Main.cpp:22:53: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
22 | if(k!=j&&s[k].size()==a[i]&&s[k][b[i]-1]==s[j][i-1]){
| ~~~~~~~~~~~^~~~~~
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 | 1 ms | 4180 KiB |
| 00-sample-02.txt | WA | 1 ms | 4192 KiB |
| 01-01.txt | RE | 90 ms | 3920 KiB |
| 01-02.txt | RE | 90 ms | 3816 KiB |
| 01-03.txt | RE | 90 ms | 3888 KiB |
| 01-04.txt | RE | 88 ms | 3920 KiB |
| 01-05.txt | RE | 88 ms | 3920 KiB |
| 01-06.txt | RE | 89 ms | 3860 KiB |
| 01-07.txt | RE | 88 ms | 4012 KiB |
| 01-08.txt | RE | 87 ms | 3832 KiB |
| 01-09.txt | RE | 89 ms | 3940 KiB |
| 01-10.txt | RE | 89 ms | 3920 KiB |
| 01-11.txt | RE | 88 ms | 3892 KiB |
| 01-12.txt | RE | 87 ms | 3908 KiB |
| 01-13.txt | RE | 89 ms | 3800 KiB |
| 01-14.txt | RE | 87 ms | 3896 KiB |
| 01-15.txt | RE | 87 ms | 3948 KiB |
| 01-16.txt | RE | 88 ms | 3896 KiB |
| 01-17.txt | RE | 87 ms | 3888 KiB |
| 01-18.txt | RE | 86 ms | 3896 KiB |
| 01-19.txt | RE | 86 ms | 3836 KiB |
| 01-20.txt | RE | 87 ms | 3764 KiB |
| 01-21.txt | RE | 87 ms | 3860 KiB |
| 01-22.txt | RE | 89 ms | 4012 KiB |
| 01-23.txt | RE | 88 ms | 3940 KiB |