結果
| 問題 | No.920 あかあお |
| コンテスト | |
| ユーザー |
Kaso_u
|
| 提出日時 | 2019-11-08 21:53:01 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 428 bytes |
| コンパイル時間 | 1,591 ms |
| コンパイル使用メモリ | 164,940 KB |
| 実行使用メモリ | 13,824 KB |
| 最終ジャッジ日時 | 2024-09-15 01:26:21 |
| 合計ジャッジ時間 | 8,186 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | TLE * 1 -- * 2 |
| other | -- * 11 |
コンパイルメッセージ
main.cpp: In function 'int convert_murasaki(int, int, int)':
main.cpp:19:1: warning: no return statement in function returning non-void [-Wreturn-type]
19 | }
| ^
ソースコード
#include<bits/stdc++.h>
using namespace std;
int convert_murasaki(int x,int y,int z){
int cnt=0;
cnt+=min(x,y);
x-=y;
y=0;
if(x>=z){
cnt+=z;
}
else{
cnt+=x;
z-=x;
x=0;
cnt+=(z/2);
}
cout << cnt << endl;
}
int main(){
int x,y,z;
int cnt;
cin >> x >> y >> z;
if(x>y){
convert_murasaki(x,y,z);
}
else{
convert_murasaki(y,x,z);
}
return 0;
}
Kaso_u