Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<fstream>
- using namespace std;
- const int N=1000;
- int main()
- {
- char tab[N][N];
- int a=0;
- int b=0;
- ifstream plik("1000_pattern.txt");
- for(a=0; a<N; a++)
- {
- for(b=0; b<N; b++)
- {
- plik >> tab[a][b];
- }
- }
- /*
- for(a=0; a<N; a++)
- {
- for(b=0; b<N; b++)
- {
- cout<<tab[a][b];
- }
- }
- */
- for(a=0; a<N; a++)
- {
- for(b=0; b<N; b++)
- {
- if(tab[a][b]=='A' && tab[a][b+1]=='B' && tab[a][b+2]=='C')
- if(tab[a+1][b]=='B' && tab[a+2][b]=='C')
- cout<<"mam cie kurwo "<<a<<" "<<b<<endl;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement