結果
| 問題 |
No.2297 Best Grouping
|
| コンテスト | |
| ユーザー |
NAMIDAIRO
|
| 提出日時 | 2023-05-12 21:22:46 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 662 bytes |
| コンパイル時間 | 801 ms |
| コンパイル使用メモリ | 110,460 KB |
| 最終ジャッジ日時 | 2025-02-12 21:48:01 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 20 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <queue>
#include <set>
#include <random>
#include <iomanip>
#include <string>
#include <cmath>
#include <complex>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
template<class T>
using vi = vector<T>;
template<class T>
using vii = vector<vi<T>>;
template<class T>
using viii = vector<vii<T>>;
using P = pair<ll, int>;
void chmin(ll & x, ll y) { x = min(x, y); }
int main()
{
int n;
cin >> n;
n %= 3;
if (n == 0) cout << 0 << endl;
else if (n == 2) cout << 1 << endl;
else cout << 2 << endl;
return 0;
}
NAMIDAIRO