提出 #62786222
ソースコード 拡げる
#include <bits/stdc++.h>
#include <bitset>
#include <cmath>
#define ll long long
using namespace std;
#define vl vector<ll>
#define vi vector<int>
#define pb push_back
#define mp make_pair
#define yes cout << "YES\n"
#define no cout << "NO\n"
const int N = 1e9+7;
void solve(){
int n,m;
cin>>n>>m;
set<vector<int>>ans;
int count = 0;
for(int i = 0 ; i < m ; i++){
vector<int>temp(2);
for(int i = 0 ; i < 2 ; i++){
cin>>temp[i];
}
sort(temp.begin() , temp.end());
if(temp[0] == temp[1]){
count++;
continue;
}
ans.insert(temp);
}
cout<< m - ans.size()<<endl;
}
int main() {
int T = 1;
//cin >> T;
while (T--) {
solve();
}
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | C - Make it Simple |
| ユーザ | MrBlack005 |
| 言語 | C++ 20 (gcc 12.2) |
| 得点 | 300 |
| コード長 | 806 Byte |
| 結果 | AC |
| 実行時間 | 483 ms |
| メモリ | 50572 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 300 / 300 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| 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_n_small_00.txt, 01_n_small_01.txt, 01_n_small_02.txt, 01_n_small_03.txt, 02_random_00.txt, 02_random_01.txt, 02_random_02.txt, 02_random_03.txt, 02_random_04.txt, 02_random_05.txt, 02_random_06.txt, 02_random_07.txt, 03_corner_00.txt, 03_corner_01.txt, 03_corner_02.txt, 03_corner_03.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 00_sample_00.txt | AC | 1 ms | 3696 KiB |
| 00_sample_01.txt | AC | 1 ms | 3692 KiB |
| 00_sample_02.txt | AC | 1 ms | 3560 KiB |
| 01_n_small_00.txt | AC | 107 ms | 3564 KiB |
| 01_n_small_01.txt | AC | 88 ms | 3500 KiB |
| 01_n_small_02.txt | AC | 134 ms | 3544 KiB |
| 01_n_small_03.txt | AC | 98 ms | 3492 KiB |
| 02_random_00.txt | AC | 262 ms | 31328 KiB |
| 02_random_01.txt | AC | 253 ms | 30816 KiB |
| 02_random_02.txt | AC | 480 ms | 50572 KiB |
| 02_random_03.txt | AC | 483 ms | 50436 KiB |
| 02_random_04.txt | AC | 398 ms | 43372 KiB |
| 02_random_05.txt | AC | 256 ms | 31380 KiB |
| 02_random_06.txt | AC | 480 ms | 50428 KiB |
| 02_random_07.txt | AC | 480 ms | 50496 KiB |
| 03_corner_00.txt | AC | 301 ms | 26944 KiB |
| 03_corner_01.txt | AC | 388 ms | 27004 KiB |
| 03_corner_02.txt | AC | 173 ms | 4028 KiB |
| 03_corner_03.txt | AC | 171 ms | 3692 KiB |