Submission #3805140
Source Code Expand
#include <algorithm> #include <array> #include <bitset> #include <complex> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <set> #include <stack> #include <unordered_map> #include <unordered_set> #include <queue> using namespace std; struct BoolName : numpunct<char> { string t, f; BoolName (string t = "Yes", string f = "No") : t(t), f(f) {} string do_truename() const {return t;} string do_falsename() const {return f;} }; struct Initializer { Initializer() { cin.tie(0); ios::sync_with_stdio(0); cout << fixed << setprecision(15) << boolalpha; cout.imbue(locale(cout.getloc(), new BoolName)); } } initializer; template<typename T> istream& operator>>(istream &s, vector<T> &v) { for (T &t : v) s >> t; return s; } template<typename T> ostream& operator<<(ostream &s, const vector<T> &v) { for (const T &t : v) s << t << endl; return s; } void set_bool_name(string t, string f) { cout.imbue(locale(cout.getloc(), new BoolName(t, f))); } int main() { int a, b; cin >> a >> b; cout << (a % 3 == 0 || b % 3 == 0 || (a + b) % 3 == 0 ? "Possible" : "Impossible") << endl; }
Submission Info
Submission Time | |
---|---|
Task | A - Sharing Cookies |
User | not |
Language | C++14 (GCC 5.4.1) |
Score | 100 |
Code Size | 1179 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 256 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_example_01.txt, 00_example_02.txt |
All | 00_example_01.txt, 00_example_02.txt, 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_example_01.txt | AC | 1 ms | 256 KB |
00_example_02.txt | AC | 1 ms | 256 KB |
01.txt | AC | 1 ms | 256 KB |
02.txt | AC | 1 ms | 256 KB |
03.txt | AC | 1 ms | 256 KB |
04.txt | AC | 1 ms | 256 KB |
05.txt | AC | 1 ms | 256 KB |
06.txt | AC | 1 ms | 256 KB |
07.txt | AC | 1 ms | 256 KB |