提出 #68188226
ソースコード 拡げる
#include<bits/stdc++.h> using namespace std; #define rep(i, s, t) for(int i = (s); i <= (t); i ++) #define per(i, s, t) for(int i = (s); i >= (t); i --) template<typename T, typename T2> inline void chmin(T &x, T2 &&y) { x = min(x, y); } template<typename T, typename T2> inline void chmax(T &x, T2 &&y) { x = max(x, y); } typedef long long ll; void solve() { ll n, m; cin >> n >> m; if(m % 2 == 0) cout << n * m / 2 << "\n"; else cout << n * (m / 2) + 1 << "\n"; } signed main() { ios::sync_with_stdio(0);cin.tie(0); int t;cin >> t;while(t --) solve(); return 0; }
提出情報
提出日時 | |
---|---|
問題 | A - All Winners |
ユーザ | adam01 |
言語 | C++ 20 (gcc 12.2) |
得点 | 400 |
コード長 | 616 Byte |
結果 | AC |
実行時間 | 37 ms |
メモリ | 4036 KiB |
ジャッジ結果
セット名 | Sample | All | ||||
---|---|---|---|---|---|---|
得点 / 配点 | 0 / 0 | 400 / 400 | ||||
結果 |
|
|
セット名 | テストケース |
---|---|
Sample | sample.txt |
All | handmade.txt, random_1.txt, random_2.txt, random_3.txt, random_4.txt, random_5.txt, sample.txt |
ケース名 | 結果 | 実行時間 | メモリ |
---|---|---|---|
handmade.txt | AC | 33 ms | 3500 KiB |
random_1.txt | AC | 19 ms | 3504 KiB |
random_2.txt | AC | 31 ms | 3576 KiB |
random_3.txt | AC | 13 ms | 3508 KiB |
random_4.txt | AC | 1 ms | 3484 KiB |
random_5.txt | AC | 37 ms | 4036 KiB |
sample.txt | AC | 1 ms | 3496 KiB |