Unfortunately we were unable to fully decode your file, as it is not encoded in UTF-8.
You can try to decode it yourself by downloading it here.
// Micha� Figlus #include<cstdio> #include<cmath> #include<cstring> #include<cstdlib> #include<iostream> #include<fstream> #include<vector> #include<queue> #include<stack> #include<list> #include<algorithm> using namespace std; int main() { int w_min,w_max,h_min,h_max,t,n,i,j,a,b,c,d,maj; scanf("%d",&t); for(j=1;j<=t;j++) { scanf("%d",&n); w_min=1000000000; w_max=0; h_min=1000000000; h_max=0; for(i=1;i<=n;i++) { scanf("%d%d%d%d",&a,&b,&c,&d); if(a<w_min) {w_min=a; maj=0;} if(b>w_max) {w_max=b; maj=0;} if(c<h_min) {h_min=c; maj=0;} if(d>h_max) {h_max=d; maj=0;} if(a==w_min&&b==w_max&&c==h_min&&d==h_max) maj=i; } if(maj>0) printf("TAK\n"); else printf("NIE\n"); } return 0; }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | // Micha� Figlus #include<cstdio> #include<cmath> #include<cstring> #include<cstdlib> #include<iostream> #include<fstream> #include<vector> #include<queue> #include<stack> #include<list> #include<algorithm> using namespace std; int main() { int w_min,w_max,h_min,h_max,t,n,i,j,a,b,c,d,maj; scanf("%d",&t); for(j=1;j<=t;j++) { scanf("%d",&n); w_min=1000000000; w_max=0; h_min=1000000000; h_max=0; for(i=1;i<=n;i++) { scanf("%d%d%d%d",&a,&b,&c,&d); if(a<w_min) {w_min=a; maj=0;} if(b>w_max) {w_max=b; maj=0;} if(c<h_min) {h_min=c; maj=0;} if(d>h_max) {h_max=d; maj=0;} if(a==w_min&&b==w_max&&c==h_min&&d==h_max) maj=i; } if(maj>0) printf("TAK\n"); else printf("NIE\n"); } return 0; } |