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; | |
| typedef pair<int,int> pii; | |
| typedef long long ll; | |
| #define ITR(i,c) for(auto i=begin(c);i!=end(c);i++) | |
| #define FORE(x,arr) for(auto &x:arr) | |
| #define FOR(i,a,n) for(int i=a;i<(int)(n);i++) | |
| #define REP(i,n) FOR(i,0,n) | |
| #define ALL(c) begin(c),end(c) | |
| const int DX[4]={0,1,0,-1}, DY[4]={-1,0,1,0}; |
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; | |
| typedef pair<int,int> pii; | |
| typedef long long ll; | |
| #define ITR(i,c) for(auto i=begin(c);i!=end(c);i++) | |
| #define FOR(i,a,n) for(int i=a;i<(int)(n);i++) | |
| #define FORE(x,arr) for(auto &x:arr) | |
| #define REP(i,n) FOR(i,0,n) | |
| #define ALL(c) begin(c),end(c) | |
| const int DX[4]={0,1,0,-1}, DY[4]={-1,0,1,0}; |
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; | |
| typedef pair<int,int> pii; | |
| typedef long long ll; | |
| #define ITR(i,c) for(auto i=begin(c);i!=end(c);i++) | |
| #define FORE(x,arr) for(auto &x:arr) | |
| #define FOR(i,a,n) for(int i=a;i<(int)(n);i++) | |
| #define REP(i,n) FOR(i,0,n) | |
| #define ALL(c) begin(c),end(c) | |
| const int DX[4]={0,1,0,-1}, DY[4]={-1,0,1,0}; |
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 int long long | |
| using ll=long long; | |
| using vi=vector<int>; | |
| using vl=vector<long long>; | |
| using pii=pair<int,int>; | |
| using pll=pair<long long,long long>; | |
| #define ITR(i,c) for(auto i=begin(c);i!=end(c);++i) | |
| #define FORE(x,c) for(auto &x:c) |
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 <iostream> | |
| #include <vector> | |
| #include <string> | |
| #include <cstring> | |
| #include <fstream> | |
| #include <cmath> | |
| // 44100 Hz / 16 bit / ステレオ のリニアPCM | |
| #define SAMPLING_RATE (44100) |
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
| \documentclass{jarticle} | |
| \makeatletter | |
| \newcount \xx@res | |
| \def\remainder#1#2{ | |
| \newcount \xx@a | |
| \xx@a = #1 | |
| \divide \xx@a #2 | |
| \multiply \xx@a -#2 | |
| \advance \xx@a #1 | |
| \xx@res = \xx@a |
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; | |
| string reverseChallenge(string s) { | |
| string t, ans; | |
| vector<int> len; | |
| int l = 0; | |
| s += ' '; | |
| for(size_t i = 0; i < s.size(); i++) { | |
| if(s[i]==' ') { |
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; | |
| static const int MOD = 1000000007; | |
| struct DerangementsDiv2 { | |
| long long bin_pow_mod(long long x,long long y) { | |
| if(x==0) return 0; | |
| long long prod=1; | |
| while(y>0) { |
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; | |
| struct NiceTable { | |
| string isNice(vector<string> t) { | |
| int n=t.size(); | |
| int m=t[0].size(); | |
| for(int x=0; x<(1<<n); x++) { | |
| for(int y=0; y<(1<<m); y++) { | |
| bool ok=true; |
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; | |
| struct LexmaxReplace { | |
| string get(string s, string t) { | |
| sort(begin(t), end(t)); | |
| reverse(begin(t), end(t)); | |
| int n=s.size(); | |
| int idx=0; | |
| for(int i=0; i<n; i++) { |
OlderNewer