Submission #68188970


Source Code Expand

#include <bits/stdc++.h>
#define SZ(x) ((int)(x).size())
#define ALL(x) begin(x), end(x)
#define REP(i, n) for (int i = 0; i < int(n); i++)
#define REP1(i, a, b) for (int i = (a); i <= int(b); i++)

#if __has_include("shik/dump.h")
#include "shik/dump.h"  // IWYU pragma: keep
#else
#define dump(...) 0
#endif

using namespace std;
using i64 = int64_t;

int64_t n, m;
void input() {
  cin >> n >> m;
}

i64 solve() {
  i64 k = m / 2;
  return n * k + m % 2;
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int t;
  cin >> t;
  while (t--) {
    input();
    auto ans = solve();
    cout << ans << '\n';
  }
  return 0;
}

Submission Info

Submission Time
Task A - All Winners
User shik
Language C++ 20 (gcc 12.2)
Score 400
Code Size 679 Byte
Status AC
Exec Time 36 ms
Memory 4148 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 400 / 400
Status
AC × 1
AC × 7
Set Name Test Cases
Sample sample.txt
All handmade.txt, random_1.txt, random_2.txt, random_3.txt, random_4.txt, random_5.txt, sample.txt
Case Name Status Exec Time Memory
handmade.txt AC 32 ms 3392 KiB
random_1.txt AC 19 ms 3524 KiB
random_2.txt AC 30 ms 3460 KiB
random_3.txt AC 13 ms 3472 KiB
random_4.txt AC 1 ms 3592 KiB
random_5.txt AC 36 ms 4148 KiB
sample.txt AC 1 ms 3464 KiB