結果
| 問題 |
No.2563 色ごとのグループ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-10-27 10:51:09 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 317 bytes |
| コンパイル時間 | 2,856 ms |
| コンパイル使用メモリ | 245,408 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-26 16:32:30 |
| 合計ジャッジ時間 | 9,682 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 35 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
int n,m,a,b; cin >> n >> m;
vector<int> C(n),CI(n); for (int& a:C) (cin >> a),++CI[a-1];
while(m--){
cin >> a >> b;
if (C[a-1]==C[b-1]) --CI[C[a-1]-1];
}
int r(0);
for (int a:CI){ cout << a << endl; if (a) r+=a-1; }
cout << r << endl;
}