結果
問題 | No.83 最大マッチング |
ユーザー |
![]() |
提出日時 | 2023-07-22 17:26:10 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 21 ms / 5,000 ms |
コード長 | 3,084 bytes |
コンパイル時間 | 1,663 ms |
コンパイル使用メモリ | 193,492 KB |
最終ジャッジ日時 | 2025-02-15 18:02:54 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
#include <bits/stdc++.h>using namespace std;// clang-format off#define GET_MACRO_5(_1, _2, _3, _4, _5, NAME, ...) NAME#define GET_MACRO_4(_1, _2, _3, _4, NAME, ...) NAME#define rep(...) GET_MACRO_5(__VA_ARGS__, rep5, rep4, rep3, rep2, rep1)(__VA_ARGS__)#define rrep(...) GET_MACRO_4(__VA_ARGS__, rrep4, rrep3, rrep2, rrep1)(__VA_ARGS__)#define rep1(n) rep2(_, n)#define rep2(i, n) rep3(i, 0, n)#define rep3(i, a, n) rep4(i, a, n, 1)#define rep4(i, a, n, d) rep5(i, a, n, d, <)#define rep5(i, a, n, d, o) for (auto i = decltype(n)(a), _n = (n); i o _n; i += (d))#define rrep1(n) rrep2(_, n)#define rrep2(i, n) rrep3(i, n, 0)#define rrep3(i, a, n) rrep4(i, a, n, 1)#define rrep4(i, a, n, d) rep5(i, a - 1, n, -d, >=)#define ALL(c) begin(c), end(c)#define RALL(c) rbegin(c), rend(c)#define SORT(v) sort(ALL(v))#define REV(v) reverse(ALL(v))using ll = long long;using ull = unsigned long long;using ld = long double;using vi = vector<int>;using vll = vector<long long>;using vs = vector<string>;using vvi = vector<vector<int>>;template<typename T> inline bool chmax(T &a, T b) { return ((a < b) ? (a = b, true) : (false)); }template<typename T> inline bool chmin(T &a, T b) { return ((a > b) ? (a = b, true) : (false)); }template<class C> inline void vcin(C& c) { for (auto& a : c) { cin >> a; } }void _cin() {} template<class Head, class... Tail> void _cin(Head&& head, Tail&&... tail) { cin >> head; _cin(std::forward<Tail>(tail)...); }#define IN(Type, ...) Type __VA_ARGS__; _cin(__VA_ARGS__)#define INV(Type, xs, n) vector<Type> xs(n); rep(i, n) cin >> xs[i]#define INV2(Type, xs, ys, n) vector<Type> xs(n), ys(n); rep(i, n) cin >> xs[i] >> ys[i]#define INV3(Type, xs, ys, zs, n) vector<Type> xs(n), ys(n), zs(n); rep(i, n) cin >> xs[i] >> ys[i] >> zs[i]#define INVV(Type, xs, h, w) vector<vector<Type>> xs(h, vector<Type>(w)); rep(i, h) rep(j, w) cin >> xs[i][j]void OUT() { cout << endl; }template<class Head, class... Tail> void OUT(Head&& head, Tail&&... tail) { cout << head; if (sizeof...(tail) != 0) cout << endl; OUT(std::forward<Tail>(tail)...); }template<class Head, class... Tail> void OUTS(Head&& head, Tail&&... tail) { cout << head; if (sizeof...(tail) != 0) cout << " "; OUT(std::forward<Tail>(tail)...); }template<class Type> void OUT(vector<Type> &vec) { for (auto& a : vec) { cout << a; if (&a != &vec.back()) cout << endl; } }template<class Type> void OUTS(vector<Type> &vec) { for (auto& a : vec) { cout << a; if (&a != &vec.back()) cout << " "; } cout << endl; }template<class Type> void OUT(vector<vector<Type>> &df) { for (auto& vec : df) { OUT(vec); } }// clang-format onint main(){cin.tie(0)->sync_with_stdio(0);/*** 0 ... 6* 1 ... 2* 2 ... 5* 3 ... 5* 4 ... 4* 5 ... 5* 6 ... 6* 7 ... 3* 8 ... 7* 9 ... 6*/IN(int, N);if (N % 2 == 0) {rep (N / 2) {cout << 1;}} else {cout << 7;rep ((N - 3) / 2) {cout << 1;}}cout << endl;return 0;}