This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Inspired from Psyho, macros of the template are taken from Psyho's template */ | |
| #include<bits/stdc++.h> | |
| using namespace std; | |
| #define REP(i,n) for(int (i)=(0);(i)<(n);(i)++) | |
| #define FOR(i,a,b) for(int (i)=(a);(i)<(b);(i)++) | |
| #define FOREACH(it,c) for(auto it=(c).begin();it!=(c).end();++it) | |
| #define PB push_back | |
| #define S size() | |
| #define X first |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define MAX 1000001 | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include <unistd.h> | |
| class FastInput { | |
| public: | |
| FastInput() { | |
| m_dataOffset = 0; | |
| m_dataSize = 0; | |
| m_v = 0x80000000; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private static class Parser | |
| { | |
| final private int BUFFER_SIZE = 1 << 16; | |
| private DataInputStream din; | |
| private byte[] buffer; | |
| private int bufferPointer, bytesRead; | |
| public Parser(InputStream in) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class InputReader { | |
| private InputStream stream; | |
| private byte[] buf = new byte[1024]; | |
| private int curChar; | |
| private int numChars; | |
| private SpaceCharFilter filter; | |
| public InputReader(InputStream stream) { | |
| this.stream = stream; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> | |
| using namespace std; | |
| const int N = 500005; | |
| int a[N]; | |
| int main() { | |
| int n, k; | |
| cin >> n >> k; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> | |
| using namespace std; | |
| #define FOR(i,a,b) for (int i = (a); i < (b); i++) | |
| #define REP(i,n) for(int i = 0; i < (n); i++) | |
| #define SZ(x) ((int)((x).size())) | |
| #define ALL(c) (c).begin(),(c).end() | |
| #define PB push_back | |
| #define MP make_pair |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> | |
| using namespace std; | |
| template <class T> | |
| class SquareIt | |
| { | |
| public: | |
| T x; | |
| SquareIt () |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> | |
| using namespace std; | |
| template <class T> | |
| class point | |
| { | |
| public : | |
| T x, y; | |
| point () |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> | |
| using namespace std; | |
| template <class T> | |
| T Max (T a, T b) | |
| { | |
| T res = a > b ? a : b; | |
| return res; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> | |
| using namespace std; | |
| #define SZ(a) int((a).size()) | |
| #define PB push_back | |
| #define ALL(c) (c).begin(),(c).end() | |
| #define MP make_pair | |
| #define FOR(i,a,b) for(int i=(a);i<=(b);++i) | |
| #define REP(i,a) FOR(i,0,(a)-1) | |
| #define FORD(i,n,a) for(int (i)=(n);(i)>=a;(i)--) |
NewerOlder