提出 #36607077


ソースコード 拡げる

#include <bits/stdc++.h>
#define st first
#define nd second
#define db double
#define re register
#define pb push_back
#define mk make_pair
#define int long long
#define ldb long double
#define pii pair<int, int>
#define ull unsigned long long
#define mst(a, b) memset(a, b, sizeof(a))
using namespace std;
inline int read()
{
  int s = 0, w = 1;
  char ch = getchar();
  while(ch < '0' || ch > '9') { if(ch == '-') w *= -1; ch = getchar(); }
  while(ch >= '0' && ch <= '9') s = s * 10 + ch - '0', ch = getchar();
  return s * w;
}
int n, Q;
map<pii, bool> mp;
signed main()
{
  n = read(), Q = read();
  while(Q--){
    int op = read(), x = read(), y = read();
    if(op == 1) mp[mk(x, y)] = true;
    if(op == 2) mp[mk(x, y)] = false;
    if(op == 3){
      if(mp[mk(x, y)] && mp[mk(y, x)]) puts("Yes");
      else puts("No");
    }
  }
  return 0;
}

提出情報

提出日時
問題 C - FF
ユーザ Booksnow
言語 C++ (GCC 9.2.1)
得点 300
コード長 888 Byte
結果 AC
実行時間 124 ms
メモリ 16044 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 300 / 300
結果
AC × 3
AC × 17
セット名 テストケース
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_small_sns_03.txt, 01_small_sns_04.txt, 01_small_sns_05.txt, 01_small_sns_06.txt, 02_random_07.txt, 02_random_08.txt, 03_max_09.txt, 03_max_10.txt, 04_large_sns_11.txt, 04_large_sns_12.txt, 04_large_sns_13.txt, 05_handmade_14.txt, 05_handmade_15.txt, 05_handmade_16.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 14 ms 3504 KiB
00_sample_01.txt AC 2 ms 3476 KiB
00_sample_02.txt AC 2 ms 3492 KiB
01_small_sns_03.txt AC 2 ms 3484 KiB
01_small_sns_04.txt AC 20 ms 3552 KiB
01_small_sns_05.txt AC 65 ms 6028 KiB
01_small_sns_06.txt AC 15 ms 3404 KiB
02_random_07.txt AC 11 ms 4344 KiB
02_random_08.txt AC 48 ms 8872 KiB
03_max_09.txt AC 114 ms 13512 KiB
03_max_10.txt AC 98 ms 11452 KiB
04_large_sns_11.txt AC 67 ms 10568 KiB
04_large_sns_12.txt AC 40 ms 7196 KiB
04_large_sns_13.txt AC 57 ms 7932 KiB
05_handmade_14.txt AC 118 ms 15100 KiB
05_handmade_15.txt AC 124 ms 16044 KiB
05_handmade_16.txt AC 62 ms 9744 KiB