Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
#include
int main(){ int n, corr = 0; scanf("%d", &n); for(int tc=1; tc<=n; tc++){ int board[9][9]; bool correct = true; for(int i=0; i<9 ;i++) for(int j=0; j<9; j++) scanf("%d", &board[i][j]); for(int i=0; i<9 && correct;i++){ bool flag[10] = {0}; for(int j=0; j<9; j++){ if(flag[board[i][j]]){ correct = false; break; }else{ flag[board[i][j]] = true; } } } for(int i=0; i<9 && correct;i++){ bool flag[10] = {0}; for(int j=0; j<9; j++){ if(flag[board[j][i]]){ correct = false; break; }else{ flag[board[j][i]] = true; } } } for(int i=0; i<9; i+=3){ for(int j=0; j<9; j+=3){ bool flag[10] = {0}; for(int k=i; k
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)