fork(1) download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. struct punkt{
  4. char nazwa;
  5. int x, y;
  6. };
  7.  
  8. int main() {
  9.  
  10. int n;
  11. cin>>n;
  12. punkt tab[n];
  13. for(int i=0;i<n;i++)
  14. cin>>tab[i].nazwa>>tab[i].x>>tab[i].y;
  15. cout<<"I\n";
  16. for(int i=0;i<n;i++)
  17. if(tab[i].x > 0 && tab[i].y > 0 )
  18. cout<<tab[i].nazwa<<' '<<tab[i].x<<' '<<tab[i].y<<endl;
  19. cout<<"II\n";
  20. for(int i=0;i<n;i++)
  21. if(tab[i].x < 0 && tab[i].y > 0 )
  22. cout<<tab[i].nazwa<<' '<<tab[i].x<<' '<<tab[i].y<<endl;
  23. cout<<"III\n";
  24. for(int i=0;i<n;i++)
  25. if(tab[i].x < 0 && tab[i].y < 0 )
  26. cout<<tab[i].nazwa<<' '<<tab[i].x<<' '<<tab[i].y<<endl;
  27. cout<<"IV\n";
  28. for(int i=0;i<n;i++)
  29. if(tab[i].x > 0 && tab[i].y < 0 )
  30. cout<<tab[i].nazwa<<' '<<tab[i].x<<' '<<tab[i].y<<endl;
  31.  
  32.  
  33.  
  34. return 0;
  35. }
Success #stdin #stdout 0.01s 5268KB
stdin
Standard input is empty
stdout
I
x 32765 4
 32765 4
� 2147479976 3
� 5279 14
� 32765 2147479976
P 5279 3498069
 1 13072
@ 4194313 1703963
 1 4
 6 97736
 4 4
P 4 85164
 1685382482 4
 20 3
 131 21
 10 402856979
 1409319169 277349892
t 46147592 537592136
� 1610888467 553701996
 1611170002 81920
� 134226962 1225261585
� 205783816 1326586890
� 21 22
 30 31
! 36 38
 39 41
� 5279 65537
 65537 32765
P 5279 5
� 5279 1
� 5279 2
� 2 5279
� 32765 3
 2212 5279
` 5279 7
� 5279 2
 2 2
 5279 880
  5279 5809656
II
� -75274608 32765
� -75274560 32765
� -194182386 5279
 -199781296 5279
 -75274704 32765
� -195792369 5279
� -195792369 5279
� -194056096 5279
 -194193415 5279
 -194288688 5279
� -75273793 32765
� -75270240 32765
G -2040578053 274294760
� -2147153920 272629762
� -845773727 214286852
� -75271040 32765
� -194288640 5279
 -75272208 32765
� -75272836 32765
 -208535552 5
 -75272778 32765
 -194287064 5279
� -194051696 5279
 -194287008 5279
 -75271040 32765
 -194288640 5279
� -194186802 5279
� -75272560 32765
� -194292464 5279
� -194293760 5279
� -194160412 5279
� -194287008 5279
� -196251652 5279
� -198323744 5279
 -75272064 32765
 -194292896 5279
� -194186802 5279
� -196077166 5279
� -194293760 5279
� -196227632 5279
 -196083367 5279
� -196251652 5279
� -194293760 5279
� -194186097 5279
 -194293760 5279
 -75271744 32765
� -194293760 5279
 -194166592 5279
� -75270560 32765
 -1969348288 22032
 -196204328 5279
 -1966649744 22032
 -1966649744 22032
� -75270524 32765
 -195149010 5279
 -1969359472 22032
III
� -741873076 -1126826161
 -264442 -75272768
� -1 -1
IV
 5279 -75273840
 5279 -75273936
 5279 -75273936
 3 -194288688
 5279 -194160412
  32765 -75273792
D 550535170 -2104491839
� 538978321 -1509211384
* 45 -75272176
P 32765 -194173534
p 5279 -75272176
� 32765 -75272208
� 5279 -385875968
 16449537 -75272784
 5279 -194287008
 5279 -194289920
� 5279 -198323744
` 5279 -194186802
� 5279 -194292464
� 5279 -194291184
 5279 -198380408
� 5279 -198389852
� 5279 -75271960
( 32765 -194293760
  5279 -194160412
 5279 -194287008
 5279 -194293760
� 5279 -198323744
( 5279 -194186802
� 5279 -2136999708
� 32765 -196204328
� 5279 -194287008
` 5279 -75271576
� 32765 -194292896
0 5279 -196424656
` 5279 -196204328
; 32765 -194307040
 32765 -194137670
P 22032 -1966727152
p 22032 -1966649744
 255 -1
( 5279 -75270524
� 32765 -1969360566