結果
| 問題 |
No.3109 Swap members
|
| コンテスト | |
| ユーザー |
AK_Mi
|
| 提出日時 | 2025-04-18 20:22:09 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 606 bytes |
| コンパイル時間 | 2,266 ms |
| コンパイル使用メモリ | 193,316 KB |
| 実行使用メモリ | 16,804 KB |
| 最終ジャッジ日時 | 2025-04-18 20:22:16 |
| 合計ジャッジ時間 | 6,580 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 TLE * 1 -- * 47 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(void){
int n,k;
int check = 0;
string mem;
string member[100000];
cin >> n >> k;
for(int i = 0; i < n; i++){
cin >> member[i];
}
for(int i = 0; i < n; i++){
cin >> mem;
for(int t = 0; t < n; t++){
if(member[t] == mem){
if(t % k != i % k)check = 1;
break;
}
}
if(check == 1){
cout << "No" << endl;
break;
}
}
if(check == 0)cout << "Yes" << endl;
return 0;
}
AK_Mi