-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTestFileLeetCode.cpp
109 lines (90 loc) · 2.76 KB
/
TestFileLeetCode.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
//Mahir Ratanpara (DA-IICT)
#include<bits/stdc++.h>
using namespace std;
#define Ff(i, a, n) for(i=a;i<n;i++)
#define Fr(i, a, n) for(i=a;i>n;i--)
#define ll long long
#define FAST ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0)
#define pb push_back
#define ff first
#define ss second
#define all(x) x.begin(), x.end()
#define clr(x) memset(x, 0, sizeof(x))
#define sortall(x) sort(all(x))
#define tr(it, a) for(auto it = a.begin(); it != a.end(); it++)
#define inp(a) Ff(i,0,a.size()) cin>>a[i];
typedef pair<ll, ll> pa;
typedef vector<ll> vc;
typedef vector<pa> vp;
typedef vector<vc> vvc;
using matrix = vector<vector<ll> >;
int mpow(int base, int exp);
void ipgraph(ll n, ll m);
void dfs(int u, int par);
void outc(vc a);
void oute(vc a);
void out2(matrix a);
const int mod = 1000000007;
const int N = 3e5, M = N;
//=======================
vc g[N];
int main() {
FAST;
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
freopen("error.txt", "w", stderr);
#endif
ll t;
t = 1;
vector<string> a = {"zsrs", "daqn", "loajxsl", "hhqkt", "slxiziyf", "rdzfyhgle", "v", "fbsmjxhcn", "pxscg",
"hpxndkqjh", "cihpirm", "fhixozfh", "mgeysxb", "icvezcc", "ogcsqhfmbq", "iwmoiwp", "hbksjto",
"c", "xn", "w", "otie", "errlpglazq", "jj", "vrtuwlmkh", "yulxfcuypy", "oojvw", "almcvzu",
"exchiodmg", "cvx", "gxojn", "ilzrq", "pgtnfg", "mdqtuadbaz", "whfbvtkip", "hggcpal", "lfpbjut",
"lrpi", "mgaj", "ttbwvzuhea", "mwdcehyt", "sli", "cdsrkxyou", "jmd", "lgsndxffa", "b",
"tbkibeu", "crstuepwvv", "lyday", "pfnwdqir", "mlb", "afgdywx", "ily", "snbehhg", "scndl", "b",
"etbrae", "qcrcmqjapf", "ruwsb", "jzpfw", "d", "nj", "fiyugwkj", "dyg", "hnnhx", "wlrrui"};
int B = 61;
vector<string> ans = fullJustify(a, B);
cout << ans.size();
return 0;
}
int mpow(int base, int exp) {
base %= mod;
int result = 1;
while (exp > 0) {
if (exp & 1) result = ((ll) result * base) % mod;
base = ((ll) base * base) % mod;
exp >>= 1;
}
return result;
}
void ipgraph(ll n, ll m) {
int i, u, v;
while (m--) {
cin >> u >> v;
g[u - 1].pb(v - 1);
g[v - 1].pb(u - 1);
}
}
void dfs(int u, int par) {
for (int v:g[u]) {
if (v == par) continue;
dfs(v, u);
}
}
void outc(vc a) {
for (int i = 0; i < a.size(); i++)
cout << a[i] << " ";
}
void oute(vc a) {
for (int i = 0; i < a.size(); i++)
cout << a[i] << "\n";
}
void out2(matrix a) {
for (int i = 0; i < a.size(); i++) {
for (int j = 0; j < a[i].size(); i++)
cout << a[i][j] << " ";
cout << "\n";
}
}