Submission #1334277
Source Code Expand
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; string a[n][n],b[n][n]; for(int i=0; i<n; i++) { for(int j=0; j<n; j++) { cin>>a[i][j] b[i][j]=a[i][j]; } } int s=0; if(a[0][1]=="#")s++; if(a[1][0]=="#")s++; if(s%2==0)b[0][0]="."; else b[0][0]=="#"; for(int p=1; p<n; p++) { int r=0; if(a[0][p+1]) } }
Submission Info
Submission Time | |
---|---|
Task | C - 天下一王国の歴史 |
User | matsuki1045 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 399 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:14:4: error: expected ‘;’ before ‘b’ b[i][j]=a[i][j]; ^ ./Main.cpp:27:17: error: could not convert ‘a[0][(p + 1)]’ from ‘std::string {aka std::basic_string<char>}’ to ‘bool’ if(a[0][p+1]) ^ ./Main.cpp:28:2: error: expected primary-expression before ‘}’ token } ^