提出 #25404891
ソースコード 拡げる
#include<bits/stdc++.h>
using namespace std;
#define int long long int
#define ld long double
#define MOD 1000000007
#define endl "\n"
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define all(var) (var).begin(), (var).end()
#define sz(x) (int)x.size()
#define MAXX 9000000000000000000
template <typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p) { return os << "(" << p.first << ", " << p.second << ")"; }
template <typename T_container, typename T = typename enable_if<!is_same<T_container, string>::value, typename T_container::value_type>::type> ostream& operator<<(ostream &os, const T_container &v) { os << '{'; string sep; for (const T &x : v) os << sep << x, sep = ", "; return os << '}'; }
template <typename T> void debug_out(string s, T t) { cout << "[" << s << ": " << t << "]\n"; }
template <typename T, typename... U> void debug_out(string s, T t, U... u) { int w = 0, c = 0; while(w < (int)s.size()) { if(s[w] == '(') c++; if(s[w] == ')') c--; if(!c and s[w] == ',') break; w++; } cout << "[" << s.substr(0, w) << ": " << t << "] "; debug_out(s.substr(w+2, (int)s.size()-w-1), u...); }
#define DEBUG
#ifdef DEBUG
#define dbg(Z...) debug_out(#Z, Z)
#else
#define dbg(Z...)
#endif
int32_t main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >> n;
map<pair<string, string>, int> ma;
while(n--)
{
string x, y;
cin >> x >> y;
if(ma.find(mp(x, y)) != ma.end())
{
cout << "Yes";
return 0;
}
ma[(mp(x, y))] = 1;
}
cout << "No";
return 0;
}
提出情報
| 提出日時 |
|
| 問題 |
B - Same Name |
| ユーザ |
KahanHai |
| 言語 |
C++ (GCC 9.2.1) |
| 得点 |
200 |
| コード長 |
1696 Byte |
| 結果 |
AC |
| 実行時間 |
5 ms |
| メモリ |
3736 KiB |
ジャッジ結果
| セット名 |
Sample |
All |
| 得点 / 配点 |
0 / 0 |
200 / 200 |
| 結果 |
|
|
| セット名 |
テストケース |
| Sample |
example0.txt, example1.txt, example2.txt |
| All |
000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, example0.txt, example1.txt, example2.txt |
| ケース名 |
結果 |
実行時間 |
メモリ |
| 000.txt |
AC |
1 ms |
3612 KiB |
| 001.txt |
AC |
5 ms |
3612 KiB |
| 002.txt |
AC |
4 ms |
3624 KiB |
| 003.txt |
AC |
2 ms |
3624 KiB |
| 004.txt |
AC |
2 ms |
3464 KiB |
| 005.txt |
AC |
3 ms |
3520 KiB |
| 006.txt |
AC |
3 ms |
3632 KiB |
| 007.txt |
AC |
4 ms |
3736 KiB |
| example0.txt |
AC |
2 ms |
3496 KiB |
| example1.txt |
AC |
2 ms |
3660 KiB |
| example2.txt |
AC |
2 ms |
3660 KiB |