結果
問題 | No.2599 Summer Project |
ユーザー |
|
提出日時 | 2024-01-12 21:21:44 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 4,898 bytes |
コンパイル時間 | 1,803 ms |
コンパイル使用メモリ | 192,992 KB |
最終ジャッジ日時 | 2025-02-18 17:32:58 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 4 |
ソースコード
//#pragma GCC optimize("O3,unroll-loops")//#pragma GCC target("avx,avx2,fma,tune=native")//#pragma GCC target("avx,avx2,fma")//#pragma GCC target("tune=native")#include <bits/stdc++.h>using namespace std;#define ff first#define ss second#define all(x) begin(x), end(x)#define rall(x) (x).rbegin(), (x).rend()#define PB emplace_back#define MP make_pair#define MT make_tuple#define REP(i, a, b) for (ll i = (a); i < (b); ++i)#define RREP(i, a, b) for (ll i = (a); i > (b); --i)#define cinai(a, n) REP(ii, 0, n) cin >> a[ii]#define cinani(a, n) int n; cin >> n; int a[n]; cinai(a, n)#define cinan(a, n) ll n; cin >> n; ll a[n]; cinai(a, n)#define FAST_IO ios_base::sync_with_stdio(false); cin.tie(nullptr);#define FILE_IN freopen("input.txt", "r", stdin);#define FILE_OUT freopen("output.txt", "w", stdout);#define TESTCASES ll tt; cin >> tt; while (tt--)#define TESTCASES1 ll tt; cin >> tt; REP(ttt, 1, tt + 1)#define CASEOUT cout << "Case #" << ttt << ": "#define NEG_INF (-LLONG_MAX)#define FLOAT_EQ(a, b) (abs((a) - (b)) < 1e-9)#define MOD (1'000'000'007)//#define MOD_SUM(a, b) ((a) + (b) >= MOD) ? ((a) + (b) - MOD) : ((a) + (b))#define endl "\n";#define debarr(a,n) cout<<#a<<" : ";for(int i=0;i<n;i++) cerr<<a[i]<<" "; cerr<<endl;#define debmat(mat,row,col) cout<<#mat<<" :\n";for(int i=0;i<row;i++) {for(int j=0;j<col;j++) cerr<<mat[i][j]<<" ";cerr<<endl;}#define pr(...) dbs(#__VA_ARGS__, __VA_ARGS__)template <class S, class T>ostream& operator <<(ostream& os, const pair<S, T>& p) {return os << "(" << p.first << ", " << p.second << ") ";}template <class T>ostream& operator <<(ostream& os, const vector<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "] ";}template <class T>ostream& operator <<(ostream& os, const unordered_set<T>& p) {os << "{ "; for (auto& it : p) os << it << " "; return os << "} ";}template <class S, class T>ostream& operator <<(ostream& os, const unordered_map<S, T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os<< "] ";}template <class T>ostream& operator <<(ostream& os, const set<T>& p) {os << "{ "; for (auto& it : p) os << it << " "; return os << "} ";}template <class T>ostream& operator <<(ostream& os, const multiset<T>& p) {os << "{{ "; for (auto& it : p) os << it << " "; return os << "}} ";}template <class S, class T>ostream& operator <<(ostream& os, const map<S, T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "] ";}template <class T> void dbs(string str, T t) {cerr << str << " : " << t << "\n";}template <class T, class... S> void dbs(string str, T t, S... s) {int idx = str.find(','); cerr << str.substr(0, idx) << " : " << t << ","; dbs(str.substr(idx + 1), s...);}template <class T> void prc(T a, T b) {cerr << "["; for (T i = a; i != b; ++i) {if (i != a) cerr << ", "; cerr << *i;} cerr << "]\n";}//#include <ext/pb_ds/assoc_container.hpp>//#include <ext/pb_ds/tree_policy.hpp>//using namespace __gnu_pbds;//typedef tree<int, null_type, less<int>, rb_tree_tag,// tree_order_statistics_node_update> indexed_set;/* find_by_order(k) and order_of_key(x) *///#include <ext/rope>//using namespace __gnu_cxx;//rope<int> v1; // can use as usual STL container// v1.push_back(x), v1.erase(start, len)// v2 = v1.substr(l, r - l + 1)// v.insert(v.mutable_begin() + idx, v2)// auto it = v.mutable_begin(); it != v.mutable_end(); it++// can index using [ ] to return const ref// modify: v.mutable_reference_at(i) = x//#include <ext/pb_ds/assoc_container.hpp>//using namespace __gnu_pbds;//gp_hash_table<int, int> table;// can use any other type as key if defined a hash function//struct chash {// int operator()(pi x) const { return x.first * 31 + x.second; }//};//gp_hash_table<pi, int, chash> table;typedef long long ll;typedef unsigned long long ull;//typedef __int128_t lll;typedef long double ld;typedef pair<int, int> pi;typedef pair<ll, ll> pl;typedef tuple<int, int, int> ti;typedef vector<int> vi;typedef vector<pi> vpi;typedef vector<vi> vvi;typedef vector<ll> vl;typedef vector<vl> vvl;// x^y mod m in O(log y)ll bin_exp_mod(ll x, ll y, ll m) {x %= m;ll ans = 1LL;while (y) {if (y & 1) ans = (ans * x) % m;x = (x * x) % m;y >>= 1;}return ans;}int main() {FAST_IO// FILE_IN// FILE_OUT// cout << setprecision(11);string problem_name = "gymnastics";#define NEW_PROBLEM#ifndef LOCAL_RIPPR#ifndef NEW_PROBLEMfreopen((problem_name + ".in").c_str(), "r", stdin);freopen((problem_name + ".out").c_str(), "w", stdout);#endif#endif// TESTCASES {}string s, t;cin >> s >> t;if (s != "watermelon" && t != "watermelon") cout << "watermelon";if (s != "beachball" && t != "beachball") cout << "beachball";if (s != "shrinebell" && t != "shrinebell") cout << "shrinebell";cout << flush;}