fork download
  1. // Author: pppssslc
  2. // Date: 15/08/2026
  3. #include<bits/stdc++.h>
  4.  
  5. using namespace std;
  6.  
  7. template<class X, class Y> void mini(X &x, const Y &y){
  8. x = min(x, y);
  9. }
  10.  
  11. template<class X, class Y> void maxi(X &x, const Y &y){
  12. x = max(x, y);
  13. }
  14.  
  15. typedef string str;
  16. typedef long long ll;
  17. typedef unsigned long long ull;
  18. typedef __int128 i128;
  19. typedef double db;
  20. typedef long double ld;
  21. typedef pair<int, int> pii;
  22. typedef pair<ll, ll> pll;
  23. typedef pair<ld, ld> pldld;
  24. typedef pair<db, db> pdd;
  25. typedef pair<char, char> pcc;
  26. typedef vector<int> vi;
  27. typedef vector<ll> vl;
  28. typedef vector<char> vc;
  29. typedef vector<pii> vpii;
  30. typedef vector<pll> vpll;
  31. typedef vector<vector<int>> vii;
  32. typedef vector<vector<ll>> vll;
  33. typedef vector<vector<char>> vcc;
  34. typedef map<int, int> mpii;
  35. typedef map<ll, ll> mpll;
  36. typedef set<int> si;
  37. typedef set<ll> sl;
  38. typedef complex<ld> cd;
  39.  
  40. #define se second
  41. #define fi first
  42. #define Rep(i, l, r, x) for(int i = l; i < (int)r; i += x)
  43. #define Repd(i, l, r, x) for(int i = l; i > (int)r; i -= x)
  44. #define For(i, l, r, x) for(int i = l; i <= (int)r; i += x)
  45. #define Ford(i, l, r, x) for(int i = l; i >= (int)r; i -= x)
  46. #define Fore(x, a) for(auto x: a)
  47. #define pb push_back
  48. #define pf push_front
  49. #define ppb pop_back
  50. #define ppf pop_front
  51. #define ins insert
  52. #define era erase
  53. #define upb upper_bound
  54. #define lwb lower_bound
  55. #define all(a) a.begin(), a.end()
  56.  
  57. const db PI = acos(-1);
  58. const ll inf = 1e18 + 1;
  59. const int mod = 1e9 + 7;
  60. const int maxn = 1e5 + 5;
  61.  
  62. signed main(){
  63. ios_base::sync_with_stdio(false);
  64. cin.tie(nullptr); cout.tie(nullptr);
  65.  
  66. cerr << "TIME ELAPSED: " << 1.0 * clock() / CLOCKS_PER_SEC << "s.\n";
  67. return 0;
  68. }
Success #stdin #stdout #stderr 0s 5320KB
stdin
5 5
2 1 5
1 2 3 5
1 4 5 2
2 2 4
2 2 3
stdout
Standard output is empty
stderr
TIME ELAPSED: 0.004491s.