結果
| 問題 |
No.1046 Fruits Rush
|
| コンテスト | |
| ユーザー |
LV3zJigVW57oPGy
|
| 提出日時 | 2022-11-12 17:00:31 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 381 bytes |
| コンパイル時間 | 1,822 ms |
| コンパイル使用メモリ | 162,916 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-14 07:04:52 |
| 合計ジャッジ時間 | 2,159 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 6 WA * 8 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#include <stdio.h>
#include <iomanip>
#include <iostream>
#include <string>
#include <algorithm>
int main(){
int a, b;
int count=0;
cin >> a >> b;
vector<int> vec(a);
for(int i=0;i<a;i++){
cin >> vec.at(i);
}
sort(vec.rbegin(),vec.rend());
for(int i=0;i<b;i++){
count += vec.at(i);
}
cout << count;
}
LV3zJigVW57oPGy