fork download
  1. #include<bits/stdc++.h>
  2.  
  3.  
  4. /// macros
  5. #define int long long
  6. #define ll long long
  7.  
  8.  
  9.  
  10. #define fast ios::sync_with_stdio(0);cin.tie(0);
  11. /////
  12.  
  13. using namespace std;
  14.  
  15. // void inc(int& x){
  16. // x+=1;
  17. // }
  18.  
  19.  
  20.  
  21.  
  22.  
  23. //remaining:
  24. //cerr
  25. //freopen()
  26.  
  27. //strings,...
  28.  
  29.  
  30. signed main(){
  31. fast;
  32.  
  33.  
  34. // ll x;cin>>x;
  35.  
  36.  
  37. // int a = 1;
  38. // inc(a);
  39. // cout<<a<<endl;
  40.  
  41.  
  42.  
  43.  
  44.  
  45. // number n ,, n times ==> x print x+1
  46.  
  47.  
  48. // int tt=1;
  49. // cin>>tt;
  50. // int tmp=tt;
  51. // while(tt--){
  52. // cout<<"test case no."<<(tmp-tt)<<" : ";
  53. // int n; cin>>n;
  54. // for(int i = 1 ; i<= n;i++){
  55. // if(i%2==1){
  56. // cout<<i+1<<' ';
  57. // }
  58. // }
  59. // cout<<"\n\n"; // endl xx
  60.  
  61. // }
  62. // 1 3 5
  63. // 2 4 6
  64.  
  65. // 1 3 5 7 9
  66. // 2 4 6 8 10
  67.  
  68.  
  69. // int sm=0;//0
  70.  
  71. // int tmp;
  72.  
  73. // for(int i = 0 ; i < 3 ;i++){
  74.  
  75.  
  76. // cin>>tmp;
  77. // sm+=tmp;
  78. // }
  79. // cout<<sm;
  80.  
  81.  
  82.  
  83.  
  84.  
  85. // int n; cin>>n;
  86.  
  87. // int cnt=0;
  88. // for(int i = 0 ; i < n ; i++){
  89. // for(int j = 0 ; j < n ;j ++){
  90. // cnt++;
  91. // }
  92. // }
  93. // for(int j = 0 ; j < n ;j ++){
  94. // cnt++;
  95. // }
  96. // cout<<cnt;
  97. // // o(n)+o(n^2) n2
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105. // for(int i = 0 ; i <= 3 ;i++){
  106.  
  107. // if(i==2) break;//breaking the loop
  108. // // if(i==2) continue;// skipping the iteration
  109.  
  110. // cout<<i<<' ';
  111. // }
  112.  
  113.  
  114.  
  115. // int arr[3+1][4+1]={};
  116. // //0-index /////<<<<<<<<<<<<<<<<<<<<<<
  117.  
  118.  
  119. // for(int i= 1 ; i <= 3 ;i++){
  120. // for(int j = 1 ; j <= 4 ;j++){
  121. // cin>>arr[i][j];
  122. // }
  123. // }
  124.  
  125.  
  126. // for(int i= 1 ; i <= 3 ;i++){ //rows
  127.  
  128. // for(int j = 1 ; j <= 4 ;j++){ //columns per row
  129. // cout<<arr[i][j]<<' ';
  130. // }
  131. // cout<<endl;
  132.  
  133. // }
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144. //prefix sum
  145.  
  146. /*
  147.   you are given n numbers , there are q queries
  148.   for each query: l ,r
  149.   you have to print the sum from l to r in the arr
  150.   */
  151. // 1 2 3 4 5 6
  152. //q = 3
  153. // query.1 : l=1 , r=3
  154.  
  155. // int arr[10]={};//assume n <=10
  156. // int n; cin>>n;//no. of elements
  157. // for(int i = 0 ; i < n ;i++){
  158. // cin>>arr[i]; //input
  159. // }
  160.  
  161. // int l=0,r=3;
  162. // // from index 0 to index 3
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169. //arr:
  170. // 1 2 3 4 5 6
  171.  
  172. //arr[i]+arr[i-1]
  173. // 1 3 6 10 15 21
  174. // ^ ^
  175. //l=2, r=4
  176.  
  177. // arr[4]-arr[2-1]
  178.  
  179. //arr[r]-arr[l-1]
  180. // x1 2x 3 4 5
  181. // ^ ^
  182.  
  183.  
  184.  
  185. //1th to 10th
  186. // l,r l-- r--
  187.  
  188. /////////////////////////////////////////////
  189.  
  190.  
  191. // int n; cin>>n;
  192. // int arr[10]={};
  193. // for(int i = 0 ; i < n ; i++){
  194. // cin>>arr[i];
  195. // }
  196. // for(int i = 1 ; i<n ;i++){
  197. // arr[i]+=arr[i-1];
  198. // }
  199. // for(int i =0; i<n ; i++){
  200. // cout<<arr[i]<<' ';
  201. // }
  202. // cout<<endl;
  203. //
  204. //
  205. // int q; cin>>q;
  206. //
  207. // int l,r;
  208. // while(q--){
  209. // // if(l>r)swap(l,r);//if l is bigger,, even it doesn't occur alot
  210. // cin>>l>>r;
  211. // r--;l--;
  212. //
  213. //
  214. // cout<<arr[r]-(l?arr[l-1]:0);
  215. //
  216. // //////////same as:
  217. // // if(l==0) cout<<arr[r];
  218. // // else cout<<arr[r]-arr[l-1];
  219. //
  220. // cout<<endl;
  221. // }
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234. ////small if
  235. // int x;cin>>x;
  236. // cout<<(x%2==0?"even":"odd");
  237.  
  238.  
  239.  
  240.  
  241.  
  242. //int => 2^31-1
  243. //long long =>2^64-1
  244.  
  245.  
  246. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
Standard output is empty