結果
問題 | No.2098 [Cherry Alpha *] Introduction |
ユーザー |
|
提出日時 | 2022-10-14 21:23:03 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 1,784 bytes |
コンパイル時間 | 2,120 ms |
コンパイル使用メモリ | 194,504 KB |
最終ジャッジ日時 | 2025-02-08 03:23:26 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using pll = pair<ll,ll>; #define rep(i,n) for (int i = 0; i < (n); i++) #define rep1(i,n) for (int i = 1; i <= (n); i++) #define all(a) begin(a), end(a) // aよりもbが大きいならばaをbで更新する // (更新されたならばtrueを返す) template <typename T> bool chmax(T &a, const T& b) { if (a < b) { a = b; // aをbで更新 return true; } return false; } // aよりもbが小さいならばaをbで更新する // (更新されたならばtrueを返す) template <typename T> bool chmin(T &a, const T& b) { if (a > b) { a = b; // aをbで更新 return true; } return false; } ll modpow(ll a, ll b, ll m) { ll p = a; ll ans = 1; rep(i,32) { if ((b & (0x01 << i)) != 0) { ans *= p; ans %= m; } p *= p; p %= m; } return (ans); } ll pow(ll a, ll b) { ll p = a; ll ans = 1; rep(i,32) { if ((b & (0x01 << i)) != 0) { ans *= p; } p *= p; } return (ans); } ll Division(ll a, ll b, ll m) { return ((a * modpow(b, m - 2, m)) % m); } struct V { int x, y; V(int x=0, int y=0): x(x), y(y) {} V operator-(const V &a) const { return V(x-a.x, y-a.y); } int cross(const V &a) const { return x*a.y - y*a.x; } int ccw(const V &a) const { int area = cross(a); if (area > 0) return +1; // ccw if (area < 0) return -1; // cw return 0; // collinear } }; /* 2147483648 int max 1000000000 1e9 9223372036854775807 ll max 1000000000000000000 1e18 */ int main() { string s; cin >> s; if (s[0] == 'Z') cout << "1st" << endl; if (s[0] == 'B') cout << "2nd" << endl; if (s[0] == 'S') cout << "3rd" << endl; if (s[0] == 'E') cout << "4th" << endl; if (s[0] == 'D') cout << "Alpha" << endl; return 0; }