From c52b36c6a37fdb1d1de146d3939cb42e2c691f44 Mon Sep 17 00:00:00 2001 From: omagdy7 Date: Sat, 5 Nov 2022 01:28:02 +0200 Subject: Solved 6 problem in filtrationContest and restructured the repo --- codeforces/Ghanophobia/main | Bin 0 -> 24608 bytes codeforces/Ghanophobia/main.cpp | 36 ++++++++++++++++++++++++++++++++ codeforces/Ghanophobia/main_input0.txt | 4 ++++ codeforces/Ghanophobia/main_output0.txt | 3 +++ 4 files changed, 43 insertions(+) create mode 100755 codeforces/Ghanophobia/main create mode 100644 codeforces/Ghanophobia/main.cpp create mode 100644 codeforces/Ghanophobia/main_input0.txt create mode 100644 codeforces/Ghanophobia/main_output0.txt (limited to 'codeforces/Ghanophobia') diff --git a/codeforces/Ghanophobia/main b/codeforces/Ghanophobia/main new file mode 100755 index 0000000..80108cd Binary files /dev/null and b/codeforces/Ghanophobia/main differ diff --git a/codeforces/Ghanophobia/main.cpp b/codeforces/Ghanophobia/main.cpp new file mode 100644 index 0000000..31dff88 --- /dev/null +++ b/codeforces/Ghanophobia/main.cpp @@ -0,0 +1,36 @@ +#include +#include + +using namespace std; + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + freopen("ghanophobia.in", "r", stdin); + int tt; + cin >> tt; + int cnt = 0; + while(tt--){ + cnt++; + string s; + cin >> s; + string s1 = s.substr(0, s.find(":")); + string s2 = s.substr(s.find(":") + 1, s.length() - 1); + int eg = stoi(s1) + 1; + int gh = stoi(s2) + 6; + cout << "Case " << cnt << ": "; + if (eg == gh){ + if (gh - 6 > 1) { + cout << "NO\n"; + } else if (gh - 6 == 1) { + cout << "PENALTIES\n"; + } else { + cout << "YES\n"; + } + } else if(eg > gh) { + cout << "YES\n"; + } else { + cout << "NO\n"; + } + } +} diff --git a/codeforces/Ghanophobia/main_input0.txt b/codeforces/Ghanophobia/main_input0.txt new file mode 100644 index 0000000..ae9045c --- /dev/null +++ b/codeforces/Ghanophobia/main_input0.txt @@ -0,0 +1,4 @@ +3 +6:0 +1:1 +6:1 diff --git a/codeforces/Ghanophobia/main_output0.txt b/codeforces/Ghanophobia/main_output0.txt new file mode 100644 index 0000000..b0ad2a2 --- /dev/null +++ b/codeforces/Ghanophobia/main_output0.txt @@ -0,0 +1,3 @@ +Case 1: YES +Case 2: NO +Case 3: PENALTIES -- cgit v1.2.3