結果
問題 | No.1986 Yummy |
ユーザー |
|
提出日時 | 2022-06-24 21:23:10 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 3,409 bytes |
コンパイル時間 | 1,962 ms |
コンパイル使用メモリ | 194,012 KB |
最終ジャッジ日時 | 2025-01-30 00:04:29 |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 24 |
ソースコード
//#define DEBUG_ //#pragma GCC optimize ("-O3") #include <bits/stdc++.h> #define rep(i,n) for(int i=0,i##_len=(n);i<i##_len;++i) #define rep1(i,x) for(int i=1;i<=(int)(x);i++) #define rrep(i,x) for(int i=((int)(x)-1);i>=0;i--) #define rrep1(i,x) for(int i=((int)(x));i>0;i--) #define fore(i,a) for(auto &i:a) #define ALL(x) (x).begin(),(x).end() #define SZ(x) ((int)(x).size()) #define ZERO(a) memset(a,0,sizeof(a)) #define MINUS(a) memset(a,0xff,sizeof(a)) #define MEMSET(v, h) memset((v), h, sizeof(v)) #define y0 y3487465 #define y1 y8687969 #define j0 j1347829 #define j1 j234892 #define next asdnext #define prev asdprev #define cauto const auto& #define bit(n) (1LL<<(n)) #define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() ); #include <iostream> #include <map> #include <set> #include <string> #include <vector> #include <iomanip> #include <algorithm> #include <queue> using namespace std; #define repi(itr, ds) for (auto itr = ds.begin(); itr != ds.end(); itr++) template <typename T> istream &operator>>(istream &is, vector<T> &vec) { for (T &x : vec) is >> x; return is; } template <typename T, typename U> ostream &operator<<(ostream &os, pair<T, U> &pair_var) { os << "(" << pair_var.first << ", " << pair_var.second << ")"; return os; } template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec) { os << "{"; for (int i = 0; i < SZ(vec); i++) { os << vec[i] << (i + 1 == SZ(vec) ? "" : ", "); } os << "}"; return os; } template <typename T, typename U> ostream &operator<<(ostream &os, map<T, U> &map_var) { os << "{"; repi(itr, map_var) { os << *itr; itr++; if (itr != map_var.end()) os << ", "; itr--; } os << "}"; return os; } template <typename T> ostream &operator<<(ostream &os, set<T> &set_var) { os << "{"; repi(itr, set_var) { os << *itr; itr++; if (itr != set_var.end()) os << ", "; itr--; } os << "}"; return os; } #define DUMPOUT cerr void dump_func() { DUMPOUT << endl; } template <class Head, class... Tail> void dump_func(Head &&head, Tail &&... tail) { DUMPOUT << head; if (sizeof...(Tail) > 0) { DUMPOUT << ", "; } dump_func(std::move(tail)...); } #ifdef DEBUG_ #define DEB #define dump(...) \ DUMPOUT << " " << string(#__VA_ARGS__) << ": " \ << "[" << to_string(__LINE__) << ":" << __FUNCTION__ << "]" \ << endl \ << " ", \ dump_func(__VA_ARGS__) #else #define DEB if (false) #define dump(...) #endif using ll = long long; template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; } const int dx[4]={1,0,-1,0}; const int dy[4]={0,1,0,-1}; const int MOD1e97 = 1e9 + 7; struct pre_main{ pre_main(){ cin.tie(nullptr); ios::sync_with_stdio(false); cout<<fixed<<setprecision(20); }; }pre_main; //oxo //oxox //oxoxo //oxoxox //oxoxoxo int main() { int n; cin >> n; if (n % 2 == 0) { cout << n/2 << endl; } else { cout << 1 << endl; } }