提出 #74686303
ソースコード 拡げる
#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';
}
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | C - Fishbones |
| ユーザ | ywrow |
| 言語 | C++23 (GCC 15.2.0) |
| 得点 | 0 |
| コード長 | 564 Byte |
| 結果 | RE |
| 実行時間 | 90 ms |
| メモリ | 4192 KiB |
コンパイルエラー
./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]){
| ~~~~~~~~~~~^~~~~~
ジャッジ結果
| セット名 | Sample | All | ||||||
|---|---|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 0 / 300 | ||||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| 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 |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 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 |