結果
| 問題 |
No.5 数字のブロック
|
| ユーザー |
LV3zJigVW57oPGy
|
| 提出日時 | 2022-11-03 23:00:06 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 406 bytes |
| コンパイル時間 | 1,338 ms |
| コンパイル使用メモリ | 162,100 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-18 05:13:13 |
| 合計ジャッジ時間 | 2,330 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 WA * 10 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#include <ios>
#include <iomanip>
#include <iostream>
#include <string>
#include <algorithm>
int main(void){
int a, b;
cin >>a>>b;
int c=0;
vector<int> vec(b);
for(int i=0;i<b;i++){
cin >>vec.at(i);
}
sort(vec.begin(),vec.end());
for(int k=0;k<vec.size();k++){
c=c+vec.at(k);
if(c>a){
cout <<k;
break;
}
}
}
LV3zJigVW57oPGy