diff options
| author | omagdy7 <omar.professional8777@gmail.com> | 2022-06-29 21:03:53 +0200 |
|---|---|---|
| committer | omagdy7 <omar.professional8777@gmail.com> | 2022-06-29 21:03:53 +0200 |
| commit | 37b7e815612dec5655d2ee2363835e2075701ae6 (patch) | |
| tree | 5c0b5e5fcf0c383c0e63c5c86524334630b35139 /codechef/ChangeRowAndColumnBoth | |
| parent | 1b8f7c9d4eb8b767d32dbbbfd96662b73c037627 (diff) | |
| download | competitive-programming-37b7e815612dec5655d2ee2363835e2075701ae6.tar.xz competitive-programming-37b7e815612dec5655d2ee2363835e2075701ae6.zip | |
Solved the first 6 problems of codechef Starters
Diffstat (limited to 'codechef/ChangeRowAndColumnBoth')
| -rw-r--r-- | codechef/ChangeRowAndColumnBoth/inp | 0 | ||||
| -rwxr-xr-x | codechef/ChangeRowAndColumnBoth/main | bin | 0 -> 22576 bytes | |||
| -rw-r--r-- | codechef/ChangeRowAndColumnBoth/main.cpp | 19 | ||||
| -rw-r--r-- | codechef/ChangeRowAndColumnBoth/main_input0.txt | 5 | ||||
| -rw-r--r-- | codechef/ChangeRowAndColumnBoth/main_output0.txt | 4 |
5 files changed, 28 insertions, 0 deletions
diff --git a/codechef/ChangeRowAndColumnBoth/inp b/codechef/ChangeRowAndColumnBoth/inp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/codechef/ChangeRowAndColumnBoth/inp diff --git a/codechef/ChangeRowAndColumnBoth/main b/codechef/ChangeRowAndColumnBoth/main Binary files differnew file mode 100755 index 0000000..e801a86 --- /dev/null +++ b/codechef/ChangeRowAndColumnBoth/main diff --git a/codechef/ChangeRowAndColumnBoth/main.cpp b/codechef/ChangeRowAndColumnBoth/main.cpp new file mode 100644 index 0000000..6cff4f0 --- /dev/null +++ b/codechef/ChangeRowAndColumnBoth/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 sx, sy, ex, ey; + cin >> sx >> sy >> ex >> ey; + if(sx != ex && sy != ey) { + cout << 1 << endl; + } else { + cout << 2 << endl; + } + } +} diff --git a/codechef/ChangeRowAndColumnBoth/main_input0.txt b/codechef/ChangeRowAndColumnBoth/main_input0.txt new file mode 100644 index 0000000..ff56c91 --- /dev/null +++ b/codechef/ChangeRowAndColumnBoth/main_input0.txt @@ -0,0 +1,5 @@ +4 +1 2 9 8 +5 5 5 7 +8 6 6 8 +3 10 8 10 diff --git a/codechef/ChangeRowAndColumnBoth/main_output0.txt b/codechef/ChangeRowAndColumnBoth/main_output0.txt new file mode 100644 index 0000000..099b7d9 --- /dev/null +++ b/codechef/ChangeRowAndColumnBoth/main_output0.txt @@ -0,0 +1,4 @@ +1 +2 +1 +2 |
