This is the text of my program:
#include <iostream>
#include <string>
#include <sstream>
#include <fstream>
using namespace std;
int main(){
string line;
ifstream inf("grid.txt");
while(!inf.eof()){
getline(inf, line);
cout << line;
}
return 0;
}
(I'll be using sstream later)
This is the contents of grid.txt:
08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08
49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00
81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65
52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91
22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 28 66 33 13 80
24 47 32 60 99 03 45 02 44 75 33 53 78 36 84 20 35 17 12 50
32 98 81 28 64 23 67 10 26 38 40 67 59 54 70 66 18 38 64 70
67 26 20 68 02 62 12 20 95 63 94 39 63 08 40 91 66 49 94 21
24 55 58 05 66 73 99 26 97 17 78 78 96 83 14 88 34 89 63 72
21 36 23 09 75 00 76 44 20 45 35 14 00 61 33 97 34 31 33 95
78 17 53 28 22 75 31 67 15 94 03 80 04 62 16 14 09 53 56 92
16 39 05 42 96 35 31 47 55 58 88 24 00 17 54 24 36 29 85 57
86 56 00 48 35 71 89 07 05 44 44 37 44 60 21 58 51 54 17 58
19 80 81 68 05 94 47 69 28 73 92 13 86 52 17 77 04 89 55 40
04 52 08 83 97 35 99 16 07 97 57 32 16 26 26 79 33 27 98 66
88 36 68 87 57 62 20 72 03 46 33 67 46 55 12 32 63 93 53 69
04 42 16 73 38 25 39 11 24 94 72 18 08 46 29 32 40 62 76 36
20 69 36 41 72 30 23 88 34 62 99 69 82 67 59 85 74 04 36 16
20 73 35 29 78 31 90 01 74 31 49 71 48 86 81 16 23 57 05 54
01 70 54 71 83 51 54 69 16 92 33 48 61 43 52 01 89 19 67 48
I'm compiling this under Cygwin and g++ and here's what I get:
$ g++ program.cpp
$ ./a.exe
01 70 54 71 83 51 54 69 16 92 33 48 61 43 52 01 89 19 67 48
To save you looking - that's the last line of the file. If I replace the loop with:
getline(inf, line);
cout << line;
getline(inf, line);
cout << line;
it will display not the first, but the second line of the file. It's been a while since I've last programmed in C++ but I'm 90% sure it's supposed to display more than one line there...
Try adding a std::endl, which will automatically append a newline and flush the buffer.
You can also use the istream& getline ( istream& is, string& str, char delim ); signature to specify another delimiter than the default which is newline in case your file doesn't have any.
What file format is your grid.txt? It's likely that your lines end with a carriage return \r
Just as I finished asking my question I tried:
cout << "hi";
before changing it to the two couts. When I got two extra characters, that's when I realized I was getting the \r character. (Can you tell I've ran into problems with the carriage return before? :P )
You're not emitting a newline at the end of the lines, so they're overwriting each other.
Change the output line to
cout << line << endl;
You're reading binary data using getline. Try using read() instead.
Related
I don't know why it is giving the wrong output(appending all remaining numbers in the string at last)can any pls help me out!!
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main()
{string str="08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91
49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00\
81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65\
52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91\
22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 28 66 33 13 80\
24 47 32 60 99 03 45 02 44 75 33 53 78 36 84 20 35 17 12 50\
32 98 81 28 64 23 67 10 26 38 40 67 59 54 70 66 18 38 64 70\
67 26 20 68 02 62 12 20 95 63 94 39 63 08 40 91 66 49 94 21\
24 55 58 05 66 73 99 26 97 17 78 78 96 83 14 88 34 89 63 72\
21 36 23 09 75 00 76 44 20 45 35 14 00 61 33 97 34 31 33 95\
78 17 53 28 22 75 31 67 15 94 03 80 04 62 16 14 09 53 56 92\
16 39 05 42 96 35 31 47 55 58 88 24 00 17 54 24 36 29 85 57\
86 56 00 48 35 71 89 07 05 44 44 37 44 60 21 58 51 54 17 58\
19 80 81 68 05 94 47 69 28 73 92 13 86 52 17 77 04 89 55 40\
04 52 08 83 97 35 99 16 07 97 57 32 16 26 26 79 33 27 98 66\
88 36 68 87 57 62 20 72 03 46 33 67 46 55 12 32 63 93 53 69\
04 42 16 73 38 25 39 11 24 94 72 18 08 46 29 32 40 62 76 36\
20 69 36 41 72 30 23 88 34 62 99 69 82 67 59 85 74 04 36 16\
20 73 35 29 78 31 90 01 74 31 49 71 48 86 81 16 23 57 05 54\
01 70 54 71 83 51 54 69 16 92 33 48 61 43 52 01 89 19 67 48";
int cnt=0;
for(int i=0;str[i];i++)
{
if(str[i]!=' ')
{
str[cnt++]=str[i];
}
}
str[cnt] = '\0';
cout<<str<<endl;
}
This is how it is displaying as output
Thank you
Strings can be split (with any whitespace in between) "like this" -> "like" " " "this".
I.e. (guessing a little a the desired outcome):
string str=
"08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 "
"49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00 "
"81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65 "
"52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91 "
"22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 28 66 33 13 80 "
"24 47 32 60 99 03 45 02 44 75 33 53 78 36 84 20 35 17 12 50 "
"32 98 81 28 64 23 67 10 26 38 40 67 59 54 70 66 18 38 64 70 "
"67 26 20 68 02 62 12 20 95 63 94 39 63 08 40 91 66 49 94 21 "
"24 55 58 05 66 73 99 26 97 17 78 78 96 83 14 88 34 89 63 72 "
"21 36 23 09 75 00 76 44 20 45 35 14 00 61 33 97 34 31 33 95 "
"78 17 53 28 22 75 31 67 15 94 03 80 04 62 16 14 09 53 56 92 "
"16 39 05 42 96 35 31 47 55 58 88 24 00 17 54 24 36 29 85 57 "
"86 56 00 48 35 71 89 07 05 44 44 37 44 60 21 58 51 54 17 58 "
"19 80 81 68 05 94 47 69 28 73 92 13 86 52 17 77 04 89 55 40 "
"04 52 08 83 97 35 99 16 07 97 57 32 16 26 26 79 33 27 98 66 "
"88 36 68 87 57 62 20 72 03 46 33 67 46 55 12 32 63 93 53 69 "
"04 42 16 73 38 25 39 11 24 94 72 18 08 46 29 32 40 62 76 36 "
"20 69 36 41 72 30 23 88 34 62 99 69 82 67 59 85 74 04 36 16 "
"20 73 35 29 78 31 90 01 74 31 49 71 48 86 81 16 23 57 05 54 "
"01 70 54 71 83 51 54 69 16 92 33 48 61 43 52 01 89 19 67 48 ";
No need for the line continuation here \<newline>, more of an obstacle.
Concerning the unexpected output of the rest of the string at the end:
Overwriting a letter with the '\0' does not have the terminating effect in a c++-string as it has in most character sequence handling functions in C.
As Botje mentions in the comments:
You overwrite 2/3 of the string, but what do you do with the remaining 1/3? You should truncate the string by either taking a substring or calling resize.
I.e. that is the way to change the effective length of a C++ string.
Not sure why you're trying to change str variable in place. Why don't you use a temporary string variable to do that?
Try this:
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main() {
string str="08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 \
49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00\
81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65\
52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91\
22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 28 66 33 13 80\
24 47 32 60 99 03 45 02 44 75 33 53 78 36 84 20 35 17 12 50\
32 98 81 28 64 23 67 10 26 38 40 67 59 54 70 66 18 38 64 70\
67 26 20 68 02 62 12 20 95 63 94 39 63 08 40 91 66 49 94 21\
24 55 58 05 66 73 99 26 97 17 78 78 96 83 14 88 34 89 63 72\
21 36 23 09 75 00 76 44 20 45 35 14 00 61 33 97 34 31 33 95\
78 17 53 28 22 75 31 67 15 94 03 80 04 62 16 14 09 53 56 92\
16 39 05 42 96 35 31 47 55 58 88 24 00 17 54 24 36 29 85 57\
86 56 00 48 35 71 89 07 05 44 44 37 44 60 21 58 51 54 17 58\
19 80 81 68 05 94 47 69 28 73 92 13 86 52 17 77 04 89 55 40\
04 52 08 83 97 35 99 16 07 97 57 32 16 26 26 79 33 27 98 66\
88 36 68 87 57 62 20 72 03 46 33 67 46 55 12 32 63 93 53 69\
04 42 16 73 38 25 39 11 24 94 72 18 08 46 29 32 40 62 76 36\
20 69 36 41 72 30 23 88 34 62 99 69 82 67 59 85 74 04 36 16\
20 73 35 29 78 31 90 01 74 31 49 71 48 86 81 16 23 57 05 54\
01 70 54 71 83 51 54 69 16 92 33 48 61 43 52 01 89 19 67 48";
string tmp = "";
for(char& c : str) if(c != ' ') tmp += c;
str = tmp;
cout << str << endl;
}
I am trying to read a .txt file line by line:
vector<vector<int>> iVecGrid;
vector<int> iVecRow;
ifstream text;
text.open("grid.txt", ios::in);
if (!text)
{
cout << "Error!\n";
return EXIT_FAILURE;
}
istringstream isLine;
string sLine;
while (getline(text, sLine))
{
isLine.str(sLine);
int iNumber;
while (isLine >> iNumber)
{
cout << iNumber << " ";
iVecRow.push_back(iNumber);
}
cout << endl;
iVecGrid.push_back(iVecRow);
iVecRow.clear();
}
When I put isLine inside the while (getline(text, sLine)) loop, it works fine.
But when I put it outside, it bugged out for some reason.
.txt file:
08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08
49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00
81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65
52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91
22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 28 66 33 13 80
24 47 32 60 99 03 45 02 44 75 33 53 78 36 84 20 35 17 12 50
32 98 81 28 64 23 67 10 26 38 40 67 59 54 70 66 18 38 64 70
67 26 20 68 02 62 12 20 95 63 94 39 63 08 40 91 66 49 94 21
24 55 58 05 66 73 99 26 97 17 78 78 96 83 14 88 34 89 63 72
21 36 23 09 75 00 76 44 20 45 35 14 00 61 33 97 34 31 33 95
78 17 53 28 22 75 31 67 15 94 03 80 04 62 16 14 09 53 56 92
16 39 05 42 96 35 31 47 55 58 88 24 00 17 54 24 36 29 85 57
86 56 00 48 35 71 89 07 05 44 44 37 44 60 21 58 51 54 17 58
19 80 81 68 05 94 47 69 28 73 92 13 86 52 17 77 04 89 55 40
04 52 08 83 97 35 99 16 07 97 57 32 16 26 26 79 33 27 98 66
88 36 68 87 57 62 20 72 03 46 33 67 46 55 12 32 63 93 53 69
04 42 16 73 38 25 39 11 24 94 72 18 08 46 29 32 40 62 76 36
20 69 36 41 72 30 23 88 34 62 99 69 82 67 59 85 74 04 36 16
20 73 35 29 78 31 90 01 74 31 49 71 48 86 81 16 23 57 05 54
01 70 54 71 83 51 54 69 16 92 33 48 61 43 52 01 89 19 67 48
When you are done with the following loop
while (isLine >> iNumber)
{
cout << iNumber << " ";
iVecRow.push_back(iNumber);
}
isLine is in a state of error. The error state needs to cleared. Add the following line after the loop.
isLine.clear();
Also, the position of isLine needs to be reset to point to the start of the string. You can use the following line for that.
isLine.seekg(0);
Both of these problems are avoided by moving the scope of isLine to inside the while block.
The following should work.
while (getline(text, sLine))
{
isLine.str(sLine);
isLine.seekg(0); //ADD. Start reading from position 0.
int iNumber;
while (isLine >> iNumber)
{
cout << iNumber << " ";
iVecRow.push_back(iNumber);
}
isLine.clear(); //ADD. Clear the error state.
cout << endl;
iVecGrid.push_back(iVecRow);
iVecRow.clear();
}
However, I would recommend sticking to your first approach. It removes the unnecessary clutter from your code.
while (getline(text, sLine))
{
std::istringstream isLine(sLine);
int iNumber;
while (isLine >> iNumber)
{
cout << iNumber << " ";
iVecRow.push_back(iNumber);
}
cout << endl;
iVecGrid.push_back(iVecRow);
iVecRow.clear();
}
When you do
while (isLine >> iNumber)
{
cout << iNumber << " ";
iVecRow.push_back(iNumber);
}
the loop runs until isLine enters a failed state. Once it enters that failed state, you can no longer read from it until you call the clear member function to clear those errors. This means that when isLine is declare outside of the while loop, the first iteration of the loop puts it into an error state, and it stays that way for each subsequent iteration since you do not manually clear the errors.
On the other hand, when isLine is declared inside the while loop, it is destroyed at the end of the loop and created again at the start of the next iteration. This process gives you a new stream that is not in a error state so you can use it as expected.
So I am having trouble finding a way to implement DFS on this table. The user will enter a start state and end state. It will be great if someone can give me some ideas as to go about solving this problem.
Enter Start State:
01
Enter End State:
70
This would be the correct answer returned.
01 -> 71 -> 73 -> 03 -> 00 -> 70
# is the fist column
Starts at #01 and goes to the first not visited position 71 then go to #71 and checks the first non repeating position being 73 then goes to #73 and checks first non repeating position in 03 and then goes to #03 and checks first non repeating position which is 00 and goes to #00 and find 70 the final state.
# a b c d e f g h
00 70 03 00 00 00 00 00 00
01 71 03 01 00 01 01 01 10
02 72 03 02 00 02 02 02 20
03 73 03 03 00 03 03 03 30
10 70 13 00 10 10 01 10 10
11 71 13 01 10 11 02 11 20
12 72 13 02 10 03 12 12 30
13 73 13 03 10 13 13 13 40
20 70 23 00 20 20 02 20 20
21 71 23 01 20 03 21 21 30
22 72 23 02 20 13 22 22 40
23 73 23 03 20 23 23 23 50
30 70 33 00 30 03 30 30 30
31 71 33 01 30 13 31 31 40
32 72 33 02 30 23 32 32 50
33 73 33 03 30 33 33 33 60
40 70 43 00 40 13 40 40 40
41 71 43 01 40 23 41 41 50
42 72 43 02 40 33 42 42 60
43 73 43 03 40 43 43 70 43
50 70 53 00 50 23 50 50 50
51 71 53 01 50 33 51 51 60
52 72 53 02 50 43 52 70 52
53 73 53 03 50 53 53 71 53
60 70 63 00 60 33 60 60 60
61 71 63 01 60 43 61 70 61
62 72 63 02 60 53 62 71 62
63 73 63 03 60 63 63 72 63
70 70 73 00 70 43 70 70 70
71 71 73 01 70 53 71 71 71
72 72 73 02 70 63 72 72 72
73 73 73 03 70 73 73 73 73
I was wondering if there was a way to construct a grid or 2D array with predetermined numbers. Specifically, problem 11 of project Euler presents the following 20x20 grid:
08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08
49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00
81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65
52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91
22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 28 66 33 13 80
24 47 32 60 99 03 45 02 44 75 33 53 78 36 84 20 35 17 12 50
32 98 81 28 64 23 67 10 26 38 40 67 59 54 70 66 18 38 64 70
67 26 20 68 02 62 12 20 95 63 94 39 63 08 40 91 66 49 94 21
24 55 58 05 66 73 99 26 97 17 78 78 96 83 14 88 34 89 63 72
21 36 23 09 75 00 76 44 20 45 35 14 00 61 33 97 34 31 33 95
78 17 53 28 22 75 31 67 15 94 03 80 04 62 16 14 09 53 56 92
16 39 05 42 96 35 31 47 55 58 88 24 00 17 54 24 36 29 85 57
86 56 00 48 35 71 89 07 05 44 44 37 44 60 21 58 51 54 17 58
19 80 81 68 05 94 47 69 28 73 92 13 86 52 17 77 04 89 55 40
04 52 08 83 97 35 99 16 07 97 57 32 16 26 26 79 33 27 98 66
88 36 68 87 57 62 20 72 03 46 33 67 46 55 12 32 63 93 53 69
04 42 16 73 38 25 39 11 24 94 72 18 08 46 29 32 40 62 76 36
20 69 36 41 72 30 23 88 34 62 99 69 82 67 59 85 74 04 36 16
20 73 35 29 78 31 90 01 74 31 49 71 48 86 81 16 23 57 05 54
01 70 54 71 83 51 54 69 16 92 33 48 61 43 52 01 89 19 67 48
And I'm trying to recreate it in code.
Thank you!
Sure:
int a[3][3] = { { 1, 2, 3},
{ 4, 5, 6},
{ 7, 8, 9} };
You're actually allowed to flatten the brace initializer out into a single run of numbers, but it's nice to be clear. In C99 and C++11 you can also have extraneous trailing commas.
I'm trying to bind the following grid to a symbol
(def grid [08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08
49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00
81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65
52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91
22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 28 66 33 13 80
24 47 32 60 99 03 45 02 44 75 33 53 78 36 84 20 35 17 12 50
32 98 81 28 64 23 67 10 26 38 40 67 59 54 70 66 18 38 64 70
67 26 20 68 02 62 12 20 95 63 94 39 63 08 40 91 66 49 94 21
24 55 58 05 66 73 99 26 97 17 78 78 96 83 14 88 34 89 63 72
21 36 23 09 75 00 76 44 20 45 35 14 00 61 33 97 34 31 33 95
78 17 53 28 22 75 31 67 15 94 03 80 04 62 16 14 09 53 56 92
16 39 05 42 96 35 31 47 55 58 88 24 00 17 54 24 36 29 85 57
86 56 00 48 35 71 89 07 05 44 44 37 44 60 21 58 51 54 17 58
19 80 81 68 05 94 47 69 28 73 92 13 86 52 17 77 04 89 55 40
04 52 08 83 97 35 99 16 07 97 57 32 16 26 26 79 33 27 98 66
88 36 68 87 57 62 20 72 03 46 33 67 46 55 12 32 63 93 53 69
04 42 16 73 38 25 39 11 24 94 72 18 08 46 29 32 40 62 76 36
20 69 36 41 72 30 23 88 34 62 99 69 82 67 59 85 74 04 36 16
20 73 35 29 78 31 90 01 74 31 49 71 48 86 81 16 23 57 05 54
01 70 54 71 83 51 54 69 16 92 33 48 61 43 52 01 89 19 67 48])
This yields Exception in thread "main" java.lang.NumberFormatException: Invalid number: 08 (11.clj:1). Why can't I do this in Clojure? Are there any workarounds?
Clarification
All I want to do is paste this grid somewhere and have it act as if there were no leading zeros, even if it takes a little coercion. I don't want to have to drop all of the zeros in my editor, I'd just like to paste it in there and have each number behave as if there were no leading zeros.
One other strange detail
The REPL seems to allow zero-padded numbers, but executing a .clj file with java -cp clojure.jar -i some_file.clj will throw the error.
Leading zeros imply an octal number, so 08 is not valid. Many programming languages use this convention, starting with C.
SPOILER ALERT:
Since you're solving a Project Euler problem, you might not want to read this, even though it's only about the "how to read in the data?" part of it...
The reason this happens is as explained in the other answers. The correct solution would be to embed the input in your code as a string -- with linebreaks! -- and use something like the following:
(->> the-string
(.split #"\n")
(map #(.split #"\s+" %))
(map (partial drop-while empty?))
;; this just doesn't care about the leading 0
(mapcat (partial map #(Integer/parseInt %)))
vec)
This should produce a vector of your numbers. For a two-dimentional vector, you could replace the mapcat with a regular map and put in an extra (map vec) before the final vec.
If you prefer to put the input in a separate file and have Clojure read it from there, replace the-string and (.split #"\n") with a call to line-seq on a reader on your file.x
numbers with a leading 0 are read as if they where in base 8 so any charcter not between 0-7 will not work. to fix this you can append 10r08 to explicity specify the base.
user> 10r08
8
user> 08
; Evaluation aborted.
This messes up your nice formatting though :( sorry about that. you could write a little macro to change this for a block if you want to preserve your nicely formatted code.
Regular expressions will remove leading zeros
(re-seq #"[1-9]+[0-9]*|0{2}" the-string)
The regex phrase breaks down as follows:
[1-9]+ ;; one or more repetitions of 1-9 (i.e. must start with 1-9)
[0-9]* ;; zeros are ok after the first non-zero number has been found
|0{2} ;; or if the above can't be found, just look for two zeros
A more general expression is
#"[1-9]+[0-9]*|(?<=\s)0+(?=\s)"
which does the same thing but in the 'or' portion it uses positive lookahead and lookbehind assertions to look for a sequence of one or more zeros preceded and followed by whitespace.
With the leading zeros stripped (map read-string (re-seq ....)) works just fine
Since it only took about 3 minutes to remove all leading zeroes, I'll just paste the above vector with the zeroes removed in case anyone else wants to copy/paste the euler problem.
(def grid [ 8 2 22 97 38 15 0 40 0 75 4 5 7 78 52 12 50 77 91 8
49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 4 56 62 0
81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 3 49 13 36 65
52 70 95 23 4 60 11 42 69 24 68 56 1 32 56 71 37 2 36 91
22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 28 66 33 13 80
24 47 32 60 99 3 45 2 44 75 33 53 78 36 84 20 35 17 12 50
32 98 81 28 64 23 67 10 26 38 40 67 59 54 70 66 18 38 64 70
67 26 20 68 02 62 12 20 95 63 94 39 63 8 40 91 66 49 94 21
24 55 58 5 66 73 99 26 97 17 78 78 96 83 14 88 34 89 63 72
21 36 23 9 75 0 76 44 20 45 35 14 0 61 33 97 34 31 33 95
78 17 53 28 22 75 31 67 15 94 3 80 4 62 16 14 9 53 56 92
16 39 5 42 96 35 31 47 55 58 88 24 0 17 54 24 36 29 85 57
86 56 0 48 35 71 89 7 05 44 44 37 44 60 21 58 51 54 17 58
19 80 81 68 5 94 47 69 28 73 92 13 86 52 17 77 4 89 55 40
4 52 8 83 97 35 99 16 7 97 57 32 16 26 26 79 33 27 98 66
88 36 68 87 57 62 20 72 3 46 33 67 46 55 12 32 63 93 53 69
4 42 16 73 38 25 39 11 24 94 72 18 8 46 29 32 40 62 76 36
20 69 36 41 72 30 23 88 34 62 99 69 82 67 59 85 74 4 36 16
20 73 35 29 78 31 90 1 74 31 49 71 48 86 81 16 23 57 5 54
1 70 54 71 83 51 54 69 16 92 33 48 61 43 52 1 89 19 67 48])