fork download
  1. #include <bits/stdc++.h>
  2. #include<limits.h>
  3. #include<stdio.h>
  4. #include<cstring>
  5. #include<string>
  6. using namespace std;
  7. typedef long long ll;
  8. typedef long double ld;
  9. #define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
  10. #define pb push_back
  11. #define mp make_pair
  12. #define sz(a) a.size()
  13. #define fi first
  14. #define se second
  15. #define rsz(a,n) a.resize(n)
  16. #define test(t) ll t;cin>>t;while(t--)
  17. #define forn(i,e) for(int i = 0; i < e; i++)
  18. #define forsn(i,s,e) for(int i = s; i < e; i++)
  19. #define rforn(i,s) for(int i = s; i >= 0; i--)
  20. #define rforsn(i,s,e) for(int i = s; i >= e; i--)
  21. #define fillv(a,k) memset(a,k,sizeof(a))
  22. #define filla(a,k,n) memset(a,k,sizeof(a[0])*n)
  23. #define leadzero(a) __builtin_clz(a) //count leading zeros
  24. #define trailzero(a) __builtin_ctz(a) //count trailing zeros
  25. #define bitcount(a) __builtin_popcount(a) // count set bits (add ll)
  26. #define ln cout<<"\n"
  27. #define sp cout<<" "
  28. #define spaceprint(a,i,s,n) {forsn(i,s,n) { cout<<a[i]; sp;}}
  29. #define lineprint(a,i,s,n) {forsn(i,s,n) {cout<<a[i]; ln;}}
  30. #define maxe(a) *max_element(a.begin(),a.end())
  31. #define maxi(a) max_element(a.begin(),a.end())-a.begin()
  32. #define mine(a) *min_element(a.begin(),a.end())
  33. #define mini(a) min_element(a.begin(),a.end())-a.begin()
  34. #define all(c) c.begin(),c.end()
  35. #define trav(container, it) for(typeof(container.begin()) it = container.begin(); it != container.end(); it++)
  36. #define present(container, element) (container.find(element) != container.end())
  37. #define cpresent(container, element) (find(all(container),element) != container.end())// check the presence of element
  38. //copy(from_begin, from_end, to_begin); copy function
  39. typedef unsigned long long int ull;
  40. typedef long double ld;
  41. typedef pair<ll,ll> p64;
  42. typedef pair<int,int> p32;
  43. typedef pair<int,p32> p96;
  44. typedef vector<ll> v64;
  45. typedef vector<string> vs;
  46. typedef vector<int> v32;
  47. typedef vector<v32> vv32;
  48. typedef vector<v64> vv64;
  49. typedef vector<p32> vp32;
  50. typedef vector<p64> vp64;
  51. typedef vector<vp32> vvp32;
  52. typedef map<int,int> m32;
  53. const int LIM = 1e5+5, MOD = 1e9+7;
  54. #define sumv(v) accumulate(all(v),ll(0))
  55. #define productv(v) accumulate(all(v), ll(1), multiplies< ll >())
  56. ll gcd(ll a, ll b) { if(b == 0) return a; return gcd(b, a % b); }
  57. ll fastpowMOD(ll a, ll p,ll MOD){ if(p==0) return 1; ll z = fastpowMOD(a,p/2,MOD); z = (z*z)%MOD; if(p%2) z = (z*a)%MOD; return z; }
  58. ll fastpow(ll a, ll p){ if(p==0) return 1; ll z = fastpow(a,p/2); z = (z*z); if(p%2) z = (z*a); return z; }
  59. int main()
  60. {
  61. ll t;
  62. cin>>t;
  63. ll k;
  64. for(k=1;k<=t;k++)
  65. {
  66. ll f,i;
  67. cin>>f;
  68. //ll c[6];
  69. string g="";
  70. v64 k[10];
  71. ll s=0;
  72. char a;
  73. for(i=0;i<119;i++)
  74. {
  75. cout<<5*i+1;
  76. cout<<endl;
  77. s++;
  78. cin>>a;
  79. k[a-'A'].pb(i);
  80. }
  81. ll t;
  82. for(i=0;i<5;i++)
  83. {
  84. if(k[i].size()==23)
  85. {
  86. t=i;
  87. break;
  88. }
  89. }
  90. g=g+char(t+'A');
  91. v64 v;
  92. for(i=0;i<k[t].size();i++)
  93. {
  94. v.pb(k[t][i]);
  95. }
  96. for(i=0;i<5;i++)
  97. {
  98. k[i].resize(0);
  99. }
  100. for(i=0;i<23;i++)
  101. {
  102. cout<<5*v[i]+2;
  103. s++;
  104. cout<<endl;
  105. //char a;
  106. cin>>a;
  107. k[a-'A'].pb(v[i]);
  108. }
  109. for(i=0;i<5;i++)
  110. {
  111. if(k[i].size()==5)
  112. {
  113. t=i;
  114. break;
  115. }
  116. }
  117. g+char(t+'A');
  118. v.resize(0);
  119. for(i=0;i<k[t].size();i++)
  120. {
  121. v.pb(k[t][i]);
  122. }
  123. for(i=0;i<5;i++)
  124. {
  125. k[i].resize(0);
  126. }
  127. for(i=0;i<5;i++)
  128. {
  129. cout<<5*v[i]+3;
  130. s++;
  131. cout<<endl;
  132. cin>>a;
  133. k[a-'A'].pb(v[i]);
  134. }
  135. for(i=0;i<5;i++)
  136. {
  137. if(k[i].size()==2)
  138. {
  139. t=i;
  140. break;
  141. }
  142. }
  143. g+char(t+'A');
  144. v.resize(0);
  145. for(i=0;i<k[t].size();i++)
  146. {
  147. v.pb(k[t][i]);
  148. }
  149. for(i=0;i<5;i++)
  150. {
  151. k[i].resize(0);
  152. }
  153. for(i=0;i<1;i++)
  154. {
  155. cout<<5*v[i]+4;
  156. s++;
  157. cout<<endl;
  158. //char a;
  159. cin>>a;
  160. k[a-'A'].pb(v[i]);
  161. }
  162. for(i=0;i<5;i++)
  163. {
  164. if(k[i].size()==1)
  165. {
  166. t=i;
  167. break;
  168. }
  169. }
  170. g+char(t+'A');
  171. v.resize(0);
  172. for(i=0;i<k[t].size();i++)
  173. {
  174. v.pb(k[t][i]);
  175. }
  176. for(i=0;i<5;i++)
  177. {
  178. k[i].resize(0);
  179. }
  180. ll y[6];
  181. for(i=0;i<g.size();i++)
  182. {
  183. y[g[i]-'A']++;
  184. }
  185. for(i=0;i<5;i++)
  186. {
  187. if(y[i]==0)
  188. {
  189. g+char(i+'A');
  190. }
  191. }
  192. //char a;
  193. for(i=0;i<f-s;i++)
  194. {
  195. cout<<5+4;
  196. cout<<endl;
  197. //char a;
  198. cin>>a;
  199. }
  200. cout<<g;
  201. cout<<endl;
  202. cin>>a;
  203. }
  204. }
  205.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, or enum expected
#include <bits/stdc++.h>
         ^
Main.java:2: error: illegal character: '#'
#include<limits.h>
^
Main.java:3: error: illegal character: '#'
#include<stdio.h>
^
Main.java:4: error: illegal character: '#'
#include<cstring>
^
Main.java:5: error: illegal character: '#'
#include<string>
^
Main.java:7: error: class, interface, or enum expected
typedef long long ll;
^
Main.java:8: error: class, interface, or enum expected
typedef long double ld;
^
Main.java:9: error: illegal character: '#'
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
^
Main.java:9: error: class, interface, or enum expected
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
        ^
Main.java:9: error: class, interface, or enum expected
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
                                              ^
Main.java:9: error: class, interface, or enum expected
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
                                                         ^
Main.java:10: error: illegal character: '#'
#define pb push_back
^
Main.java:11: error: illegal character: '#'
#define mp make_pair
^
Main.java:12: error: illegal character: '#'
#define sz(a) a.size()
^
Main.java:13: error: illegal character: '#'
#define fi first
^
Main.java:14: error: illegal character: '#'
#define se second
^
Main.java:15: error: illegal character: '#'
#define rsz(a,n) a.resize(n)
^
Main.java:16: error: illegal character: '#'
#define test(t) ll t;cin>>t;while(t--)
^
Main.java:16: error: class, interface, or enum expected
#define test(t) ll t;cin>>t;while(t--)
                     ^
Main.java:16: error: class, interface, or enum expected
#define test(t) ll t;cin>>t;while(t--)
                            ^
Main.java:17: error: illegal character: '#'
#define forn(i,e) for(int i = 0; i < e; i++)
^
Main.java:17: error: class, interface, or enum expected
#define forn(i,e) for(int i = 0; i < e; i++)
                                 ^
Main.java:17: error: class, interface, or enum expected
#define forn(i,e) for(int i = 0; i < e; i++)
                                        ^
Main.java:18: error: illegal character: '#'
#define forsn(i,s,e) for(int i = s; i < e; i++)
^
Main.java:18: error: class, interface, or enum expected
#define forsn(i,s,e) for(int i = s; i < e; i++)
                                    ^
Main.java:18: error: class, interface, or enum expected
#define forsn(i,s,e) for(int i = s; i < e; i++)
                                           ^
Main.java:19: error: illegal character: '#'
#define rforn(i,s) for(int i = s; i >= 0; i--)
^
Main.java:19: error: class, interface, or enum expected
#define rforn(i,s) for(int i = s; i >= 0; i--)
                                  ^
Main.java:19: error: class, interface, or enum expected
#define rforn(i,s) for(int i = s; i >= 0; i--)
                                          ^
Main.java:20: error: illegal character: '#'
#define rforsn(i,s,e) for(int i = s; i >= e; i--)
^
Main.java:20: error: class, interface, or enum expected
#define rforsn(i,s,e) for(int i = s; i >= e; i--)
                                     ^
Main.java:20: error: class, interface, or enum expected
#define rforsn(i,s,e) for(int i = s; i >= e; i--)
                                             ^
Main.java:21: error: illegal character: '#'
#define fillv(a,k) memset(a,k,sizeof(a))
^
Main.java:22: error: illegal character: '#'
#define filla(a,k,n) memset(a,k,sizeof(a[0])*n)
^
Main.java:23: error: illegal character: '#'
#define leadzero(a) __builtin_clz(a) //count leading zeros
^
Main.java:24: error: illegal character: '#'
#define trailzero(a) __builtin_ctz(a) //count trailing zeros
^
Main.java:25: error: illegal character: '#'
#define bitcount(a) __builtin_popcount(a) // count set bits (add ll)
^
Main.java:26: error: illegal character: '#'
#define ln cout<<"\n"
^
Main.java:27: error: illegal character: '#'
#define sp cout<<" "
^
Main.java:28: error: illegal character: '#'
#define spaceprint(a,i,s,n) {forsn(i,s,n) { cout<<a[i]; sp;}}
^
Main.java:28: error: class, interface, or enum expected
#define spaceprint(a,i,s,n) {forsn(i,s,n) { cout<<a[i]; sp;}}
                                                        ^
Main.java:28: error: class, interface, or enum expected
#define spaceprint(a,i,s,n) {forsn(i,s,n) { cout<<a[i]; sp;}}
                                                           ^
Main.java:29: error: illegal character: '#'
#define lineprint(a,i,s,n) {forsn(i,s,n) {cout<<a[i]; ln;}}
^
Main.java:29: error: class, interface, or enum expected
#define lineprint(a,i,s,n) {forsn(i,s,n) {cout<<a[i]; ln;}}
                                                      ^
Main.java:29: error: class, interface, or enum expected
#define lineprint(a,i,s,n) {forsn(i,s,n) {cout<<a[i]; ln;}}
                                                         ^
Main.java:30: error: illegal character: '#'
#define maxe(a) *max_element(a.begin(),a.end())
^
Main.java:31: error: illegal character: '#'
#define maxi(a) max_element(a.begin(),a.end())-a.begin()
^
Main.java:32: error: illegal character: '#'
#define mine(a) *min_element(a.begin(),a.end())
^
Main.java:33: error: illegal character: '#'
#define mini(a) min_element(a.begin(),a.end())-a.begin()
^
Main.java:34: error: illegal character: '#'
#define all(c) c.begin(),c.end()
^
Main.java:35: error: illegal character: '#'
#define trav(container, it) for(typeof(container.begin()) it = container.begin(); it != container.end(); it++)
^
Main.java:35: error: class, interface, or enum expected
#define trav(container, it) for(typeof(container.begin()) it = container.begin(); it != container.end(); it++)
                                                                                  ^
Main.java:35: error: class, interface, or enum expected
#define trav(container, it) for(typeof(container.begin()) it = container.begin(); it != container.end(); it++)
                                                                                                         ^
Main.java:36: error: illegal character: '#'
#define present(container, element) (container.find(element) != container.end())
^
Main.java:37: error: illegal character: '#'
#define cpresent(container, element)  (find(all(container),element) != container.end())// check the presence of element
^
Main.java:40: error: class, interface, or enum expected
typedef long double ld;
^
Main.java:41: error: class, interface, or enum expected
typedef pair<ll,ll> p64;
^
Main.java:42: error: class, interface, or enum expected
typedef pair<int,int> p32;
^
Main.java:43: error: class, interface, or enum expected
typedef pair<int,p32> p96;
^
Main.java:44: error: class, interface, or enum expected
typedef vector<ll> v64;
^
Main.java:45: error: class, interface, or enum expected
typedef vector<string> vs;
^
Main.java:46: error: class, interface, or enum expected
typedef vector<int> v32;
^
Main.java:47: error: class, interface, or enum expected
typedef vector<v32> vv32;
^
Main.java:48: error: class, interface, or enum expected
typedef vector<v64> vv64;
^
Main.java:49: error: class, interface, or enum expected
typedef vector<p32> vp32;
^
Main.java:50: error: class, interface, or enum expected
typedef vector<p64> vp64;
^
Main.java:51: error: class, interface, or enum expected
typedef vector<vp32> vvp32;
^
Main.java:52: error: class, interface, or enum expected
typedef map<int,int> m32;
^
Main.java:53: error: class, interface, or enum expected
const int LIM = 1e5+5, MOD = 1e9+7;
^
Main.java:54: error: illegal character: '#'
#define sumv(v) accumulate(all(v),ll(0))
^
Main.java:54: error: class, interface, or enum expected
#define sumv(v) accumulate(all(v),ll(0))
        ^
Main.java:55: error: illegal character: '#'
#define productv(v) accumulate(all(v), ll(1), multiplies< ll >())
^
Main.java:56: error: class, interface, or enum expected
ll gcd(ll a, ll b) { if(b == 0) return a; return gcd(b, a % b); }
                                          ^
Main.java:56: error: class, interface, or enum expected
ll gcd(ll a, ll b) { if(b == 0) return a; return gcd(b, a % b); }
                                                                ^
Main.java:57: error: class, interface, or enum expected
ll fastpowMOD(ll a, ll p,ll MOD){ if(p==0) return 1; ll z = fastpowMOD(a,p/2,MOD); z = (z*z)%MOD; if(p%2) z = (z*a)%MOD; return z; }
                                                     ^
Main.java:57: error: class, interface, or enum expected
ll fastpowMOD(ll a, ll p,ll MOD){ if(p==0) return 1; ll z = fastpowMOD(a,p/2,MOD); z = (z*z)%MOD; if(p%2) z = (z*a)%MOD; return z; }
                                                                                   ^
Main.java:57: error: class, interface, or enum expected
ll fastpowMOD(ll a, ll p,ll MOD){ if(p==0) return 1; ll z = fastpowMOD(a,p/2,MOD); z = (z*z)%MOD; if(p%2) z = (z*a)%MOD; return z; }
                                                                                                  ^
Main.java:57: error: class, interface, or enum expected
ll fastpowMOD(ll a, ll p,ll MOD){ if(p==0) return 1; ll z = fastpowMOD(a,p/2,MOD); z = (z*z)%MOD; if(p%2) z = (z*a)%MOD; return z; }
                                                                                                                         ^
Main.java:57: error: class, interface, or enum expected
ll fastpowMOD(ll a, ll p,ll MOD){ if(p==0) return 1; ll z = fastpowMOD(a,p/2,MOD); z = (z*z)%MOD; if(p%2) z = (z*a)%MOD; return z; }
                                                                                                                                   ^
Main.java:58: error: class, interface, or enum expected
ll fastpow(ll a, ll p){ if(p==0) return 1; ll z = fastpow(a,p/2); z = (z*z); if(p%2) z = (z*a); return z; }
                                           ^
Main.java:58: error: class, interface, or enum expected
ll fastpow(ll a, ll p){ if(p==0) return 1; ll z = fastpow(a,p/2); z = (z*z); if(p%2) z = (z*a); return z; }
                                                                  ^
Main.java:58: error: class, interface, or enum expected
ll fastpow(ll a, ll p){ if(p==0) return 1; ll z = fastpow(a,p/2); z = (z*z); if(p%2) z = (z*a); return z; }
                                                                             ^
Main.java:58: error: class, interface, or enum expected
ll fastpow(ll a, ll p){ if(p==0) return 1; ll z = fastpow(a,p/2); z = (z*z); if(p%2) z = (z*a); return z; }
                                                                                                ^
Main.java:58: error: class, interface, or enum expected
ll fastpow(ll a, ll p){ if(p==0) return 1; ll z = fastpow(a,p/2); z = (z*z); if(p%2) z = (z*a); return z; }
                                                                                                          ^
Main.java:62: error: class, interface, or enum expected
    cin>>t;
    ^
Main.java:63: error: class, interface, or enum expected
    ll k;
    ^
Main.java:64: error: class, interface, or enum expected
    for(k=1;k<=t;k++)
    ^
Main.java:64: error: class, interface, or enum expected
    for(k=1;k<=t;k++)
            ^
Main.java:64: error: class, interface, or enum expected
    for(k=1;k<=t;k++)
                 ^
Main.java:67: error: class, interface, or enum expected
        cin>>f;
        ^
Main.java:69: error: class, interface, or enum expected
        string g="";
        ^
Main.java:70: error: class, interface, or enum expected
        v64 k[10];
        ^
Main.java:71: error: class, interface, or enum expected
        ll s=0;
        ^
Main.java:72: error: class, interface, or enum expected
        char a;
        ^
Main.java:73: error: class, interface, or enum expected
        for(i=0;i<119;i++)
        ^
Main.java:73: error: class, interface, or enum expected
        for(i=0;i<119;i++)
                ^
Main.java:73: error: class, interface, or enum expected
        for(i=0;i<119;i++)
                      ^
Main.java:76: error: class, interface, or enum expected
            cout<<endl;
            ^
Main.java:77: error: class, interface, or enum expected
            s++;
            ^
100 errors
stdout
Standard output is empty