ამ გვერდზე თქვენ იხილავთ გაგზავნილი ამოხსნების სტატუსს.
გაგზავნის თარიღი: 08.04.2021 20:38:42
ამოცანა: კროსვორდი
მომხმარებელი: NK2007n
ვერდიქტი: სრული ამოხსნა
შეფასება: 100.0 ქულა
// prog without tests // -------- includes -------- // #include<algorithm> #include<iostream> #include<map> #include<math.h> #include<queue> #include<set> #include<stack> #include<string> #include<unordered_map> #include<unordered_set> #include<vector> // -------- defines -------- // #define no cout << "no" << endl #define No cout << "No" << endl #define NO cout << "NO" << endl #define yes cout << "yes" << endl #define Yes cout << "Yes" << endl #define YES cout << "YES" << endl #define fesvi(n) sqrt(n) #define Reverse(v) reverse(v.begin(), v.end()) #define lb lower_bound #define ub upper_bound #define sz(v) v.size() #define all(v) v.begin(), v.end() #define f first #define s second #define ll long long #define pb push_back #define For(i, n) for (long long i = 1; i <= n; i++) #define rFor(i, n) for (long long i = n; i >= 1; i--) #define Scan_Grid(v) for (int i = 1; i <= n; i++) for (int j = 1; j <= m; j++) cin >> v[i][j]; #define Print_Grid(v) for (int i = 1; i <= n; i++) { for (int j = 1; j <= m; j++) cout << v[i][j] << " "; cout << endl; } #define Scan_Vector(v) for (auto& elem : v) cin >> elem; #define Print_Vector(v) for (auto& elem : v) cout << elem << " "; #define Sort(v) sort (v.begin(), v.end()); #define Print_Yes_No(k) if (k == true) cout << "YES" << endl; else cout << "NO" << endl; using namespace std; // -------- main -------- // int main() { // -------solution------- // int n, r1 = 0, r2 = 0; cin >> n; char c[n + 1][n + 1]; for (int i = 1; i <= n; i++) for (int j = 1; j <= n; j++) cin >> c[i][j]; for (int i = 1; i <= n; i++) { for (int j = 1; j <= n; j++) { if (c[i][j] == '-' && c[i][j + 1] == '-') r1++; while (c[i][j] == '-') j++; } } for (int i = 1; i <= n; i++) { for (int j = 1; j <= n; j++) { if (c[j][i] == '-' && c[j + 1][i] == '-') r2++; while (c[j][i] == '-') j++; } } cout << r1 << " " << r2 << endl; }
5 ----# --##- ----- -##-- #----
5 4
5 4
YES
100 ######-#--#######--##---##-----#------######-#--#####-------------##---####-#--#----######--#-#-#--- -#---#-#---##------##-#-----##----####--#-#--#---##-#-#-#---#--#-#####-####-#-###-#-#-#####-#-#-#-#- ---#-####-##-######--##-##-----#-#-######-#-##-#-#...
1297 1235
1297 1235
YES
8 --#-##-# ###-##-# ###-##-# -------- ###-#### #---#### ###----# ########
4 2
4 2
YES
25 ########-################ #-----------------------# ################-######## #-----------------------# ####-##############-##### #-----------------------# ---########---########### #------------------------ ########-----###########- #------------------...
24 33
24 33
YES
44 ############################################ -------####-#--#--###--##--##----#--#-###### #---#--#-##-##----####---####-#--#-#---###-# ##--#--#-##-###----#------#---#--####---#--# ---##-----------##-##-######--###-##-##-#### #####--###----#-#####-###-#-...
273 254
273 254
YES
100 -------------------------#-------------------------------------------------------------------------- --###--------------------#-------------------------------------------------------------------------- -#---#-------------------#------------------------...
142 183
142 183
YES
50 ------###----#####-###-####-#####---#######-###### ###--###--#-#####----#--##--#####-#----###----###- --######-######-#---####-##-#####---###-#----#-#-- --###----######--##--###---##--#---#----##-#---##- #---#--#--#--##--#----##-#--##-#-###-###------##-...
323 308
323 308
YES
79 ##--#--####-###-##--#---######-##--##-#-----#---#--#--#--#-#--##--------#####-# #-###--####--#-------#--##---#--#-#---#-###-#---######-----#-####-#-###-#-###-- -------###------###---##-###--#-#--###-----###----##---#-#---###--####--#---#-# -##---##--#--...
772 750
772 750
YES
100 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##-- ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##-- ##--##--##--##--##--##--##--##--##--##--##--##--##...
2500 50
2500 50
YES
100 --##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## #--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--# -##--##--##--##--##--##--##--##--##--##--##--##--#...
2467 1650
2467 1650
YES