Submission #4050653
Source Code Expand
#include <bits/stdc++.h> using namespace std; int main() { int H, W; cin >> H >> W; vector<vector<string>> bc(H,vector<string>(W)); for (int i = 0; i< H;i++){ for (int j = 0; j<W ; j++){ cin >> bc.at(i).at(j) ; } } vector<int>t(H); for (int i= 0;i<H;i++){ for (int j= 0;j<W;j++){ if (bc.at(i).at(j) == "."){ t.at(i)++; } } if (t.at(i) == W){ for (int j=0;j<W;j++){ bc.at(i).at(j) = ""; } } } vector<int>s(W); for (int j= 0;j<W;j++){ for (int i= 0; i<H;i++){ if (bc.at(i).at(j)=="."){ s.at(j) ++; } } if (s.at(j)== H){ for (int i = 0;i<H;i++){ bc.at(i).at(j) = ""; } } } for (int i= 0;i<H;i++){ for (int j= 0;j<W;j++){ cout << bc.at(i).at(j); if (j == W-1){ cout <<endl; } } } }
Submission Info
Submission Time | |
---|---|
Task | A - Product |
User | Isibutai |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 1103 Byte |
Status | WA |
Exec Time | 2152 ms |
Memory | 781952 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 100 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 0_000.txt, 0_001.txt |
All | 0_000.txt, 0_001.txt, 1_002.txt, 1_003.txt, 1_004.txt, 1_005.txt, 1_006.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0_000.txt | WA | 1 ms | 256 KB |
0_001.txt | WA | 1 ms | 256 KB |
1_002.txt | TLE | 2151 ms | 781952 KB |
1_003.txt | TLE | 2151 ms | 781824 KB |
1_004.txt | TLE | 2152 ms | 781696 KB |
1_005.txt | WA | 1 ms | 256 KB |
1_006.txt | WA | 2 ms | 384 KB |