今年はTopCoder Single Round Match div1 EASYの問題を#601から#702まで解きます。(644,6??は欠番)
期間は2018/12/26から、2018/12/36まで開催されます。
全部解いた人から年越しです。
https://vjudge.net/contest/274573
SRM(Single Round Match)の問題は考察よりの問題と言われている事が多いようです。
#include <iostream> | |
#include <string> | |
using namespace std; | |
/* | |
m <= 3, n <= 4 が望ましい(やばいので) | |
A(m, n) = n + 1 (m == 0) | |
A(m - 1, 1) (n == 0) | |
A(m - 1, A(m ,n - 1)) (otherwise) | |
*/ |
#include <bits/stdc++.h> | |
using namespace std; | |
#define FOR(i,a,e) for(int i = a;i < e;++i) | |
using LL = long long; | |
// Put this in the declarations for a class to be uncopyable. | |
#define DISALLOW_COPY(TypeName) \ | |
TypeName(const TypeName&) = delete | |
// Put this in the declarations for a class to be unassignable. | |
#define DISALLOW_ASSIGN(TypeName) TypeName& operator=(const TypeName&) = delete |
#include <bits/stdc++.h> | |
using namespace std; | |
#define FOR(i,a,e) for(int i = a;i < e;++i) | |
using LL = long long; | |
// Put this in the declarations for a class to be uncopyable. | |
#define DISALLOW_COPY(TypeName) \ | |
TypeName(const TypeName&) = delete | |
// Put this in the declarations for a class to be unassignable. | |
#define DISALLOW_ASSIGN(TypeName) TypeName& operator=(const TypeName&) = delete |
alias g++='g++ -std=c++14 -Wall -Wextra -Wshadow -ftrapv -g' (適宜-O3) | |
for i in{a..h} | |
do | |
touch $i.cpp | |
done | |
for i in{a..h} | |
do | |
touch $i_insample.cpp |
#include <bits/stdc++.h> | |
using namespace std; | |
using VS = vector<string>; using LL = long long; | |
using VI = vector<int>; using VVI = vector<VI>; | |
using PII = pair<int, int>; using PLL = pair<LL, LL>; | |
using VL = vector<LL>; using VVL = vector<VL>; | |
#define ALL(a) begin((a)),end((a)) | |
#define RALL(a) (a).rbegin(), (a).rend() |
今年はTopCoder Single Round Match div1 EASYの問題を#601から#702まで解きます。(644,6??は欠番)
期間は2018/12/26から、2018/12/36まで開催されます。
全部解いた人から年越しです。
https://vjudge.net/contest/274573
SRM(Single Round Match)の問題は考察よりの問題と言われている事が多いようです。
#include <bits/stdc++.h> | |
using namespace std; | |
using VS = vector<string>; using LL = long long; | |
using VI = vector<int>; using VVI = vector<VI>; | |
using PII = pair<int, int>; using PLL = pair<LL, LL>; | |
using VL = vector<LL>; using VVL = vector<VL>; | |
#define ALL(a) begin((a)),end((a)) | |
#define RALL(a) (a).rbegin(), (a).rend() |
int lis(vector<int> a) { | |
int n = a.size(); | |
const int inf = 1e9; | |
vector<int> dp(n, inf); | |
for (int i = 0; i < n; i++) *lower_bound(dp.begin(), dp.end(), a[i]) = a[i]; | |
return lower_bound(dp.begin(), dp.end(), inf) - dp.begin(); | |
} | |
int main() { | |
int n; |
/* | |
* chat_client.c | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> |
#include <bits/stdc++.h> | |
using namespace std; | |
using VS = vector<string>; using LL = long long; | |
using VI = vector<int>; using VVI = vector<VI>; | |
using PII = pair<int,int>; using PLL = pair<LL, LL>; | |
using VL = vector<LL>; using VVL = vector<VL>; | |
#define ALL(a) begin((a)),end((a)) | |
#define RALL(a) (a).rbegin(), (a).rend() |