提出 #17177217
ソースコード 拡げる
#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
//#pragma GCC optimize ("-O3")
using namespace std;
void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }
//---------------------------------------------------------------------------------------------------
/*---------------------------------------------------------------------------------------------------
∧_∧
∧_∧ (´<_` ) Welcome to My Coding Space!
( ´_ゝ`) / ⌒i @hamayanhamayan0
/ \ | |
/ / ̄ ̄ ̄ ̄/ |
__(__ニつ/ _/ .| .|____
\/____/ (u ⊃
---------------------------------------------------------------------------------------------------*/
int A, B;
//---------------------------------------------------------------------------------------------------
void _main() {
cin >> A >> B;
int X = (A + B) / 2;
int Y = A - X;
printf("%d %d\n", X, Y);
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | A - Plus Minus |
| ユーザ | hamayanhamayan |
| 言語 | C++ (GCC 9.2.1) |
| 得点 | 100 |
| コード長 | 1509 Byte |
| 結果 | AC |
| 実行時間 | 5 ms |
| メモリ | 3784 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 100 / 100 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | s1.txt, s2.txt |
| All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, s1.txt, s2.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 01.txt | AC | 5 ms | 3668 KiB |
| 02.txt | AC | 2 ms | 3640 KiB |
| 03.txt | AC | 2 ms | 3584 KiB |
| 04.txt | AC | 2 ms | 3580 KiB |
| 05.txt | AC | 3 ms | 3784 KiB |
| 06.txt | AC | 2 ms | 3640 KiB |
| 07.txt | AC | 2 ms | 3488 KiB |
| 08.txt | AC | 2 ms | 3660 KiB |
| 09.txt | AC | 2 ms | 3480 KiB |
| 10.txt | AC | 2 ms | 3712 KiB |
| s1.txt | AC | 2 ms | 3476 KiB |
| s2.txt | AC | 2 ms | 3716 KiB |