結果
| 問題 |
No.2921 Seated in Classroom
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-10-12 14:38:04 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 365 ms / 2,000 ms |
| コード長 | 338 bytes |
| コンパイル時間 | 2,515 ms |
| コンパイル使用メモリ | 244,632 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-12 14:38:12 |
| 合計ジャッジ時間 | 4,877 ms |
|
ジャッジサーバーID (参考情報) |
judge / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 5 |
ソースコード
typedef long long ll;
typedef long double ld;
#include <bits/stdc++.h>
using namespace std;
signed main() {
ll t;
std::cin >> t;
for (int iiii = 0; iiii < t; iiii++) {
ll n,m;
std::cin >> n>>m;
ll atl = (n+3)/4;
m -= atl*8-n;
std::cout << atl+(max(0ll, m)+7)/8 << std::endl;
}
};