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> | |
using namespace std; | |
int main() | |
{ | |
int L; cin>>L; | |
int N; cin>>N; | |
vector<int> a(N); |
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 <string> | |
using namespace std; | |
class BalancedSubstrings{public: | |
int countSubstrings( string s ) | |
{ | |
int n = (int)s.size(); | |
int ans = 0; | |
for (int i=0; i<n; 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
■キュート | |
小日向美穂(ファン数1万人) | |
■クール | |
■パッション |
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 <vector> | |
#include <map> | |
#include <utility> | |
using namespace std; | |
// Binary Indexed Tree | |
class BIT | |
{ | |
int n; | |
vector<int> v; |
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
long long a, b; | |
long long next_(long long x) | |
{ | |
return ((x^a)+b) & ((1LL<<50)-1); | |
} | |
long long back_(long long x) | |
{ | |
return ((x+(1LL<<50)-b)^a) & ((1LL<<50)-1); |
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 <vector> | |
#include <algorithm> | |
using namespace std; | |
class MultiplicationTable2{public: | |
int minimalGoodSet( vector <int> table ) | |
{ | |
int n = 0; | |
while (n*n < int(table.size())) | |
n++; |
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 <vector> | |
#include <map> | |
#include <functional> | |
#include <algorithm> | |
using namespace std; | |
// BEGIN CUT HERE | |
#include <iostream> | |
#include <sstream> |
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 "message.h" | |
#include "winning_move.h" | |
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <numeric> | |
#include <map> | |
using namespace std; |
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
parameter N = 4; | |
reg [31:0] n [0:N-1]; | |
reg [31:0] count; | |
reg [31:0] max; | |
integer i; | |
always @(negedge rst or posedge clk) begin | |
if (rst==1'd0) begin | |
n[0] <= 32'd123; | |
n[1] <= 32'd456; |
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 <cstdio> | |
using namespace std; | |
int main() | |
{ | |
int T; |