結果
| 問題 |
No.29 パワーアップ
|
| コンテスト | |
| ユーザー |
momoyuu
|
| 提出日時 | 2022-08-15 16:04:28 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 5,000 ms |
| コード長 | 694 bytes |
| コンパイル時間 | 3,235 ms |
| コンパイル使用メモリ | 276,656 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-10-24 21:18:39 |
| 合計ジャッジ時間 | 3,740 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
| 外部呼び出し有り |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:37:11: warning: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
37 | system("pause");
| ~~~~~~^~~~~~~~~
ソースコード
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define rep(i,a,b) for (int i = a; i < b; i++)
#define irep(i,a,b) for (int i = a; i > b; i--)
#define print(n) cout << n << endl
#define rup(a,b) (a+b-1)/b
using namespace std;
int d[11];
int main(){
cout << fixed << setprecision(15);
int N;
cin >> N;
int a,b,c;
rep(i,0,N) {
cin>>a>>b>>c;
d[a] += 1;
d[b] += 1;
d[c] += 1;
}
int count = 0;
int now = 0;
int p;
rep(i,1,11){
p = (int)(d[i] / 2);
count += p;
d[i] %= 2;
now += d[i];
}
count += now/4;
print(count);
system("pause");
return 0;
}
momoyuu