From 7172d4f401f22192abc1e116a9a88c5078eb082f Mon Sep 17 00:00:00 2001 From: mjkwiatkowski Date: Mon, 1 Jun 2026 14:34:18 +0200 Subject: initial commit --- 263A/main.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 263A/main.cpp (limited to '263A/main.cpp') diff --git a/263A/main.cpp b/263A/main.cpp new file mode 100644 index 0000000..8630ae2 --- /dev/null +++ b/263A/main.cpp @@ -0,0 +1,30 @@ +#include +#include + +using namespace std; + +#define SZ 5 + +// Remember: never store the matrix +// If you have to, store it as array +int main(void){ + int a; + int b,c; + for(int i = 0; i < SZ; i++){ + for(int j = 0; j < SZ; j++){ + cin>>a; + if(a == 1){ + b = i; + c = j; + goto result; + } + } + } +result: + int rows = abs(2 - c); + int columns = abs(2 - b); + cout<