結果
| 問題 |
No.83 最大マッチング
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-09-29 14:08:43 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 5 ms / 5,000 ms |
| コード長 | 415 bytes |
| コンパイル時間 | 533 ms |
| コンパイル使用メモリ | 70,256 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-22 08:21:47 |
| 合計ジャッジ時間 | 1,096 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
#include <iostream>
#include <vector>
using namespace std;
int main(void){
//input
int match; cin >> match;
//calc
vector<int> max;
if(match % 2 == 0){
for(int i=0;i<match / 2;i++){
max.push_back(1);
}
}else{
for(int i=0;i<match / 2;i++){
if(i == 0){
max.push_back(7);
}else{
max.push_back(1);
}
}
}
//output
for(int i=0;i<max.size();i++){
cout << max.at(i);
}
cout << endl;
}