Skip to content

Commit

Permalink
Create 1610A-AntiLightsCellGuessing.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
DionysiosB committed Dec 1, 2021
1 parent f2458ca commit 7448ada
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions 1610A-AntiLightsCellGuessing.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include <cstdio>

int main(){

long t; scanf("%ld", &t);
while(t--){
long n, m; scanf("%ld %ld", &n, &m);
if(n == 1 && m == 1){puts("0");}
else if(n == 1 || m == 1){puts("1");}
else{puts("2");}
}

}

0 comments on commit 7448ada

Please sign in to comment.