結果
| 問題 |
No.547 未知の言語
|
| コンテスト | |
| ユーザー |
mikan765
|
| 提出日時 | 2017-07-28 22:36:59 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,059 bytes |
| コンパイル時間 | 966 ms |
| コンパイル使用メモリ | 78,132 KB |
| 最終ジャッジ日時 | 2025-01-05 01:55:02 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 WA * 26 |
ソースコード
#include <iostream>
#include <stdio.h>
#include <string>
#include <list>
#include <vector>
#define rep(i,n) for(int i = 0;i < n;i++)
#define REP(i,n,k) for(int i = n;i < k;i++)
#define P(p) cout << (p) << endl;//print
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int n;
cin >> n;
vector<string> s;
list<string> ss;
list<string> tt;
int count=0;
rep(i,n){
string a;
cin>>a;
s.push_back(a);
}
rep(i,n){
string t;
cin >> t;
if(t==s[i]){
count++;
}else{
ss.push_back(s[i]);
tt.push_back(t);
}
}
cout<<count<<endl;
cout << ss.front();
ss.pop_front();
for(list<string>::iterator itr = ss.begin(); itr != ss.end(); ++itr) {
cout << " " << *itr;
}
cout << endl;
cout << tt.front();
tt.pop_front();
for(list<string>::iterator itr = tt.begin(); itr != tt.end(); ++itr) {
cout << " " << *itr;
}
cout << endl;
return 0;
}
mikan765