master
parent
a3f0438c78
commit
49c9b9c679
@ -1,5 +1,21 @@
|
|||||||
{
|
{
|
||||||
"files.associations": {
|
"files.associations": {
|
||||||
"iostream": "cpp"
|
"iostream": "cpp",
|
||||||
|
"ostream": "cpp",
|
||||||
|
"*.tcc": "cpp",
|
||||||
|
"bitset": "cpp",
|
||||||
|
"set": "cpp",
|
||||||
|
"random": "cpp",
|
||||||
|
"fstream": "cpp",
|
||||||
|
"functional": "cpp",
|
||||||
|
"future": "cpp",
|
||||||
|
"istream": "cpp",
|
||||||
|
"limits": "cpp",
|
||||||
|
"shared_mutex": "cpp",
|
||||||
|
"sstream": "cpp",
|
||||||
|
"streambuf": "cpp",
|
||||||
|
"regex": "cpp",
|
||||||
|
"tuple": "cpp",
|
||||||
|
"valarray": "cpp"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -0,0 +1,134 @@
|
|||||||
|
#include <bits/stdc++.h>
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
int n;
|
||||||
|
cin >> n;
|
||||||
|
char start[10][11], end[10][11];
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
cin >> start[i];
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
cin >> end[i];
|
||||||
|
int flag = 1;
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
for (int j = 0; j < n; j++)
|
||||||
|
{
|
||||||
|
if (start[i][j] != end[j][n - 1 - i])
|
||||||
|
{
|
||||||
|
flag = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (flag == 1)
|
||||||
|
{
|
||||||
|
cout << 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
flag = 1;
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
for (int j = 0; j < n; j++)
|
||||||
|
{
|
||||||
|
if (start[i][j] != end[n - 1 - i][n - 1 - j])
|
||||||
|
{
|
||||||
|
// cout<<i<<" "<<j<<" ";
|
||||||
|
// cout << start[i][j] << "!=" << end[n - 1 - j][n - 1 - i] << endl;
|
||||||
|
flag = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (flag == 1)
|
||||||
|
{
|
||||||
|
cout << 2;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
flag = 1;
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
for (int j = 0; j < n; j++)
|
||||||
|
{
|
||||||
|
if (start[i][j] != end[n - 1 - j][i])
|
||||||
|
{
|
||||||
|
flag = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (flag == 1)
|
||||||
|
{
|
||||||
|
cout << 3;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
flag = 1;
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
for (int j = 0; j < n; j++)
|
||||||
|
{
|
||||||
|
if (start[i][j] != end[n - 1 - i][j])
|
||||||
|
{
|
||||||
|
flag = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (flag == 1)
|
||||||
|
{
|
||||||
|
cout << 4;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
char temp[10][11];
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
for (int j = 0; j < n; j++)
|
||||||
|
{
|
||||||
|
temp[n - 1 - i][j] = start[i][j];
|
||||||
|
}
|
||||||
|
/////////////////
|
||||||
|
int f1 = 1, f2 = 1, f3 = 1;
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
for (int j = 0; j < n; j++)
|
||||||
|
{
|
||||||
|
if (temp[i][j] != end[j][n - 1 - i])
|
||||||
|
{
|
||||||
|
f1 = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
for (int j = 0; j < n; j++)
|
||||||
|
{
|
||||||
|
if (temp[i][j] != end[n - 1 - j][n - 1 - i])
|
||||||
|
{
|
||||||
|
f2 = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
for (int j = 0; j < n; j++)
|
||||||
|
{
|
||||||
|
if (temp[i][j] != end[n - 1 - j][i])
|
||||||
|
{
|
||||||
|
f3 = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (f1 || f2 || f3)
|
||||||
|
{
|
||||||
|
cout << 5;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
flag = 1;
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
for (int j = 0; j < n; j++)
|
||||||
|
{
|
||||||
|
if (start[i][j] != end[i][j])
|
||||||
|
{
|
||||||
|
flag = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (flag == 1)
|
||||||
|
{
|
||||||
|
cout << 6;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
cout << 7;
|
||||||
|
////////////////
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Binary file not shown.
@ -0,0 +1,9 @@
|
|||||||
|
#include <bits/stdc++.h>
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
#include <bits/stdc++.h>
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
//都很慢
|
||||||
|
string line;
|
||||||
|
while (getline(cin, line))
|
||||||
|
{
|
||||||
|
int sum = 0, x;
|
||||||
|
stringstream ss(line);
|
||||||
|
while (ss >> x)
|
||||||
|
{
|
||||||
|
sum += x;
|
||||||
|
}
|
||||||
|
cout << sum << endl;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue