Submission #35874994
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,n) for(int i = 0;i<(int)(n);i++)
#define repi(i,a,b) for(int i = int(a);i < int(b);i++)
#define all(x) (x).begin(),(x).end()
#define F first
#define S second
#define pb push_back
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const long long INF = 1LL << 60;
const int dx[4] = {1,0,-1,0};
const int dy[4] = {0,1,0,-1};
int main() {
int h,w;
cin>>h>>w;
char c[h][w];
rep(i,h){
rep(j,w){
cin>>c[i][j];
}
}
rep(i,w){
int sum=0;
rep(j,h){
if(c[j][i]=='#'){
sum++;
}
}
cout<<sum<<' ';
}
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Line Sensor |
| User | HATO1114 |
| Language | C++ (GCC 9.2.1) |
| Score | 200 |
| Code Size | 805 Byte |
| Status | AC |
| Exec Time | 50 ms |
| Memory | 4564 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt |
| All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 02_min_00.txt, 02_min_01.txt, 03_max_00.txt, 03_max_01.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_00.txt | AC | 6 ms | 3488 KiB |
| 00_sample_01.txt | AC | 2 ms | 3516 KiB |
| 00_sample_02.txt | AC | 2 ms | 3524 KiB |
| 00_sample_03.txt | AC | 3 ms | 3548 KiB |
| 01_random_00.txt | AC | 50 ms | 4564 KiB |
| 01_random_01.txt | AC | 43 ms | 4400 KiB |
| 01_random_02.txt | AC | 5 ms | 3472 KiB |
| 01_random_03.txt | AC | 26 ms | 3684 KiB |
| 01_random_04.txt | AC | 14 ms | 3588 KiB |
| 02_min_00.txt | AC | 3 ms | 3416 KiB |
| 02_min_01.txt | AC | 3 ms | 3416 KiB |
| 03_max_00.txt | AC | 41 ms | 4392 KiB |
| 03_max_01.txt | AC | 46 ms | 4500 KiB |