結果
| 問題 |
No.8107 Listening
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-03 16:21:18 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 819 ms / 2,000 ms |
| コード長 | 437 bytes |
| コンパイル時間 | 4,613 ms |
| コンパイル使用メモリ | 250,676 KB |
| 最終ジャッジ日時 | 2025-02-20 19:54:45 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 40 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using ll = long long;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
using mint = atcoder::modint998244353;
int main(){
int n,m;
cin>>n>>m;
vector<int> stl(n,0),ans;
rep(i,m){
int u,v;
cin>>u>>v;
u--; v--;
if(stl.at(u)==0&&stl.at(v)==0){
stl.at(u)=1;
stl.at(v)=1;
ans.push_back(i+1);
}
}
cout<<ans.size()<<endl;
for(auto x:ans) cout<<x<<endl;
}