diff options
Diffstat (limited to 'contests/Starters41')
| -rwxr-xr-x | contests/Starters41/A/inp | 1 | ||||
| -rwxr-xr-x | contests/Starters41/A/main.cpp | 11 | ||||
| -rwxr-xr-x | contests/Starters41/B/inp | 5 | ||||
| -rwxr-xr-x | contests/Starters41/B/main.cpp | 16 | ||||
| -rwxr-xr-x | contests/Starters41/C/inp | 5 | ||||
| -rwxr-xr-x | contests/Starters41/C/main.cpp | 24 | ||||
| -rwxr-xr-x | contests/Starters41/D/inp | 6 | ||||
| -rwxr-xr-x | contests/Starters41/D/main.cpp | 26 | ||||
| -rwxr-xr-x | contests/Starters41/E/inp | 5 | ||||
| -rwxr-xr-x | contests/Starters41/E/main.cpp | 19 | ||||
| -rwxr-xr-x | contests/Starters41/F/inp | 6 | ||||
| -rwxr-xr-x | contests/Starters41/F/main.cpp | 21 |
12 files changed, 145 insertions, 0 deletions
diff --git a/contests/Starters41/A/inp b/contests/Starters41/A/inp new file mode 100755 index 0000000..a5b6096 --- /dev/null +++ b/contests/Starters41/A/inp @@ -0,0 +1 @@ +7 9 diff --git a/contests/Starters41/A/main.cpp b/contests/Starters41/A/main.cpp new file mode 100755 index 0000000..c51d4a4 --- /dev/null +++ b/contests/Starters41/A/main.cpp @@ -0,0 +1,11 @@ +#include<bits/stdc++.h> + +using namespace std; + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + int x, y; + cin >> x >> y; + cout << (y > x ? "YES" : "NO") << endl; +} diff --git a/contests/Starters41/B/inp b/contests/Starters41/B/inp new file mode 100755 index 0000000..c7f56f2 --- /dev/null +++ b/contests/Starters41/B/inp @@ -0,0 +1,5 @@ +4 +10 10 10 +3 1 8 +8 1 3 +4 4 1000 diff --git a/contests/Starters41/B/main.cpp b/contests/Starters41/B/main.cpp new file mode 100755 index 0000000..6508f2d --- /dev/null +++ b/contests/Starters41/B/main.cpp @@ -0,0 +1,16 @@ +#include<bits/stdc++.h> + +using namespace std; + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + int tt; + cin >> tt; + while(tt--){ + int x, y , z; + cin >> x >> y >> z; + cout << (x * 5 + y * 10) / z << endl; + + } +} diff --git a/contests/Starters41/C/inp b/contests/Starters41/C/inp new file mode 100755 index 0000000..969fe00 --- /dev/null +++ b/contests/Starters41/C/inp @@ -0,0 +1,5 @@ +4 +5 10 2 12 +10 30 15 15 +20 8 4 20 +6 6 6 6 diff --git a/contests/Starters41/C/main.cpp b/contests/Starters41/C/main.cpp new file mode 100755 index 0000000..8ee0595 --- /dev/null +++ b/contests/Starters41/C/main.cpp @@ -0,0 +1,24 @@ +#include <bits/stdc++.h> + + +using namespace std; + +int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + int tt; + cin >> tt; + while (tt--) { + int a, b, c, d; + cin >> a >> b >> c >> d; + int mx1 = max(a, b); + int mx2 = max(c, d); + if (mx1 > mx2) { + cout << "Q" << endl; + } else if (mx2 > mx1) { + cout << "P" << endl; + } else { + cout << "TIE" << endl; + } + } +} diff --git a/contests/Starters41/D/inp b/contests/Starters41/D/inp new file mode 100755 index 0000000..55e3ef3 --- /dev/null +++ b/contests/Starters41/D/inp @@ -0,0 +1,6 @@ +5 +3 4 +5 5 +7 3 +5 2 +7 12 diff --git a/contests/Starters41/D/main.cpp b/contests/Starters41/D/main.cpp new file mode 100755 index 0000000..a0365c2 --- /dev/null +++ b/contests/Starters41/D/main.cpp @@ -0,0 +1,26 @@ +#include<bits/stdc++.h> +#include <cmath> + +using namespace std; + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + int tt; + cin >> tt; + while(tt--){ + int x, y; + cin >> x >> y; + if(x > y) { + if((x - y) % 2 == 0) { + cout << (x - y) / 2 << endl; + } else { + cout << (x - y) / 2 + 2 << endl; + } + } else if (y > x) { + cout << y - x << endl; + } else { + cout << 0 << endl; + } + } +} diff --git a/contests/Starters41/E/inp b/contests/Starters41/E/inp new file mode 100755 index 0000000..ceb48d2 --- /dev/null +++ b/contests/Starters41/E/inp @@ -0,0 +1,5 @@ +4 +1 0 +2 0 +2 1 +3 1 diff --git a/contests/Starters41/E/main.cpp b/contests/Starters41/E/main.cpp new file mode 100755 index 0000000..b65501c --- /dev/null +++ b/contests/Starters41/E/main.cpp @@ -0,0 +1,19 @@ +#include<bits/stdc++.h> + +using namespace std; + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + int tt; + cin >> tt; + while(tt--){ + int n, k; + cin >> n >> k; + if(n % 2 != 0 && k == 0){ + cout << "NO" << endl; + } else { + cout << "YES" << endl; + } + } +} diff --git a/contests/Starters41/F/inp b/contests/Starters41/F/inp new file mode 100755 index 0000000..77308bf --- /dev/null +++ b/contests/Starters41/F/inp @@ -0,0 +1,6 @@ +4 +4 2 +3 3 +9 1 +3489601027782 8104267 + diff --git a/contests/Starters41/F/main.cpp b/contests/Starters41/F/main.cpp new file mode 100755 index 0000000..8159cd1 --- /dev/null +++ b/contests/Starters41/F/main.cpp @@ -0,0 +1,21 @@ +#include <bits/stdc++.h> + +using namespace std; + +int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + int tt; + cin >> tt; + while (tt--) { + long long n, k; + cin >> n >> k; + if (k == 1) { + cout << ((n % 2 == 0) ? "EVEN" : "ODD") << endl; + } else if(k == 2) { + cout << "ODD" << endl; + } else { + cout << "EVEN" << endl; + } + } +} |
