Skip to content

Commit 6f9911f

Browse files
committed
a
1 parent 020ab4f commit 6f9911f

File tree

3 files changed

+59
-30
lines changed

3 files changed

+59
-30
lines changed

CppProperties.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"configurations": [
3+
{
4+
"inheritEnvironments": [
5+
"msvc_x64"
6+
],
7+
"name": "x64-Release",
8+
"includePath": [
9+
"${env.INCLUDE}",
10+
"${workspaceRoot}\\**"
11+
],
12+
"defines": [
13+
"WIN32",
14+
"NDEBUG",
15+
"UNICODE",
16+
"_UNICODE"
17+
],
18+
"intelliSenseMode": "windows-msvc-x64"
19+
}
20+
]
21+
}

kyopro/Source/Source.cpp

+22-14
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,13 @@ Be accepted!
2929
#include <iomanip>
3030
#include <set>
3131
#include <stack>
32-
#include <bitset>
33-
34-
////多倍長整数, cpp_intで宣言
35-
//#include <boost/multiprecision/cpp_int.hpp>
36-
//using namespace boost::multiprecision;
32+
/*多倍長整数/cpp_intで宣言
33+
#include <boost/multiprecision/cpp_int.hpp>
34+
using namespace boost::multiprecision;
35+
*/
3736

3837
//#pragma gcc target ("avx2")
39-
//#pragma gcc optimization ("Ofast")
38+
//#pragma gcc optimization ("o3")
4039
//#pragma gcc optimization ("unroll-loops")
4140
#define rep(i, n) for(int i = 0; i < (n); ++i)
4241
#define rep1(i, n) for(int i = 1; i <= (n); ++i)
@@ -52,27 +51,28 @@ Be accepted!
5251
#define printdbd(a) printf("%.16lf\n", a) //少数出力(桁少なめ)
5352
#define prints(s) printf("%s\n", s.c_str()) //string出力
5453
#define all(x) (x).begin(), (x).end()
54+
#define allsum(a, b, c) ((a + b) * c / 2.0) //等差数列の和、初項,末項,項数
55+
#define pb push_back
56+
#define priq priority_queue
57+
#define rpriq priq<int, vector<int>, greater<int>>
5558
#define deg_to_rad(deg) (((deg)/360.0L)*2.0L*PI)
5659
#define rad_to_deg(rad) (((rad)/2.0L/PI)*360.0L)
5760
#define Please return
5861
#define AC 0
5962
#define manhattan_dist(a, b, c, d) (abs(a - c) + abs(b - d)) /*(a, b) から (c, d) のマンハッタン距離 */
60-
#define inf numeric_limits<double>::infinity();
61-
#define linf numeric_limits<long double>::infinity()
63+
6264

6365
using ll = long long;
64-
using ull = unsigned long long;
6566

6667
constexpr int INF = 1073741823;
6768
constexpr int MINF = -1073741823;
6869
constexpr ll LINF = ll(4661686018427387903);
69-
constexpr ll MOD = 1e9 + 7;
70-
constexpr long double eps = 1e-6;
70+
constexpr ll MOD = 1000000007;
7171
const long double PI = acosl(-1.0L);
7272

7373
using namespace std;
7474

75-
void scans(string & str) {
75+
void scans(string& str) {
7676
char c;
7777
str = "";
7878
scanf("%c", &c);
@@ -97,16 +97,24 @@ double acot(double x) {
9797
return PI / 2 - atan(x);
9898
}
9999

100+
ll gcd(ll a, ll b) {
101+
if (b == 0) return a;
102+
return gcd(b, a % b);
103+
}
104+
105+
ll lcm(ll number1, ll number2) {
106+
return number1 / gcd(number1, number2) * number2;
107+
}
108+
100109
ll LSB(ll n) { return (n & (-n)); }
101110

102111
/*-----------------------------------------ここからコード-----------------------------------------*/
103112

104113

105114

106-
107115
int main() {
108116

109-
117+
110118

111119
Please AC;
112120
}

kyopro/kyopro.vcxproj.filters

+16-16
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@
5858
<ClCompile Include="library\graph\warshallfloyd.cpp">
5959
<Filter>Library\Graph</Filter>
6060
</ClCompile>
61-
<ClCompile Include="library\math\gcd_lcm.cpp">
62-
<Filter>ソース ファイル</Filter>
63-
</ClCompile>
6461
<ClCompile Include="library\others\modint.cpp">
6562
<Filter>Library\Other</Filter>
6663
</ClCompile>
@@ -100,35 +97,38 @@
10097
<ClCompile Include="test\lcm_aoj.test.cpp">
10198
<Filter>ソース ファイル</Filter>
10299
</ClCompile>
103-
<ClCompile Include="library\others\doubling.cpp">
104-
<Filter>ソース ファイル</Filter>
105-
</ClCompile>
106100
<ClCompile Include="test\warshallfloyd_aoj.test.cpp">
107101
<Filter>ソース ファイル</Filter>
108102
</ClCompile>
109-
<ClCompile Include="library\datastructure\BBST\splaytree.cpp">
103+
<ClCompile Include="test\segtree_yosupo-judge.test.cpp">
110104
<Filter>ソース ファイル</Filter>
111105
</ClCompile>
112-
<ClCompile Include="test\segtree_yosupo-judge.test.cpp">
106+
<ClCompile Include="test\kth-shortest-path_yen_yukicoder.test.cpp">
113107
<Filter>ソース ファイル</Filter>
114108
</ClCompile>
115-
<ClCompile Include="library\graph\kth-shortest-path_yen.cpp">
109+
<ClCompile Include="test\cumulative-sum_yosupo-judge.test.cpp">
116110
<Filter>ソース ファイル</Filter>
117111
</ClCompile>
118-
<ClCompile Include="test\kth-shortest-path_yen_yukicoder.test.cpp">
112+
<ClCompile Include="test\prime_factor_yosupo-judge.test.cpp">
119113
<Filter>ソース ファイル</Filter>
120114
</ClCompile>
121115
<ClCompile Include="library\others\cumulative-sum.cpp">
122-
<Filter>ソース ファイル</Filter>
116+
<Filter>Library\Other</Filter>
123117
</ClCompile>
124-
<ClCompile Include="test\cumulative-sum_yosupo-judge.test.cpp">
125-
<Filter>ソース ファイル</Filter>
118+
<ClCompile Include="library\others\doubling.cpp">
119+
<Filter>Library\Other</Filter>
120+
</ClCompile>
121+
<ClCompile Include="library\math\gcd_lcm.cpp">
122+
<Filter>Library\Math</Filter>
123+
</ClCompile>
124+
<ClCompile Include="library\graph\kth-shortest-path_yen.cpp">
125+
<Filter>Library\Graph</Filter>
126126
</ClCompile>
127127
<ClCompile Include="library\math\prime_factor.cpp">
128-
<Filter>ソース ファイル</Filter>
128+
<Filter>Library\Math</Filter>
129129
</ClCompile>
130-
<ClCompile Include="test\prime_factor_yosupo-judge.test.cpp">
131-
<Filter>ソース ファイル</Filter>
130+
<ClCompile Include="library\datastructure\BBST\splaytree.cpp">
131+
<Filter>Library\DataStructure</Filter>
132132
</ClCompile>
133133
</ItemGroup>
134134
<ItemGroup>

0 commit comments

Comments
 (0)