diff --git a/.gitignore b/.gitignore index 3a9015a..0dc7b4b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -/.vscode -/Blue_book/sh \ No newline at end of file +/.vscode \ No newline at end of file diff --git a/blue_book/sh/tempo1.cpp b/blue_book/sh/tempo1.cpp deleted file mode 100644 index 0a6609d..0000000 --- a/blue_book/sh/tempo1.cpp +++ /dev/null @@ -1,152 +0,0 @@ -/* - Problem Name: - algorithm tag: -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace std; - -typedef long long ll; -typedef unsigned long long ull; -const int INF = 0x3f3f3f3f; -const int mod = 1e9 + 7; -const double eps = 1e-4; -typedef pair pii; -typedef pair pll; -#define x first -#define y second -#define iosf ios::sync_with_stdio(false), cin.tie(0), cout << fixed - -const int N = 105, M = 55, VV = 5150, EE = VV * VV; - -int n, m, k1, k2, R, V; -int start, ed; -int st[N][M]; -int h[VV], e[EE], ne[EE], idx; -int dx[4] = {1, 0, -1, 0}; -int dy[4] = {0, 1, 0, -1}; -int state[N][M]; -int dist[VV]; -void del_circu(int x, int y) -{ - for (int i = max(x - R, 0); i <= min(x + R, n); i++) { - for (int j = max(y - R, 0); j <= min(y + R, m); j++) { - double x1 = double(i), y1 = double(j); - if (sqrt((x1 - x) * (x1 - x) + (y1 - y) * (y1 - y)) - R <= eps) - st[i][j] = true; - } - } -} -void del_linear(int type, int x) -{ - if (type) - for (int i = 0; i <= m; i++) - st[x][i] = true; - else - for (int i = 0; i <= n; i++) - st[i][x] = true; -} -void add(int a, int b) -{ - e[idx] = b; - ne[idx] = h[a]; - h[a] = idx++; -} - -void out() -{ - for (int i = 0; i <= n; i++) { - for (int j = 0; j <= m; j++) - cout << st[i][j] << " "; - cout << endl; - } -} -int pos(int x, int y) -{ - return x * (m + 1) + y; -} - -void build(int x, int y, int u, int path) -{ - if (path >= V) - return; - for (int i = 0; i < 4; i++) { - int x1 = x + dx[i], y1 = y + dy[i]; - if (x1 < 0 || y1 < 0 || x1 > n || y1 > m || state[x1][y1]) - continue; - if (!st[x1][y1]) { - add(u, pos(x1, y1)); - //cout << u << " " << pos(x1, y1) << endl; - } - state[x1][y1] = 1; - build(x1, y1, u, path + 1); - } -} -void bfs() -{ - queue q; - q.push(pos(0, start)); - dist[pos(0, start)] = 1; - - while (q.size()) { - int u = q.front(); - q.pop(); - - for (int i = h[u]; ~i; i = ne[i]) { - int v = e[i]; - if (!dist[v]) { - q.push(v); - dist[v] = 1; - //cout << v << endl; - } - } - } -} - -int main() -{ - iosf; - cin >> n >> m >> k1 >> k2 >> R >> V >> start >> ed; - V = min(5000, V); - memset(h, -1, sizeof h); - for (int i = 1; i <= k1; i++) { - int x, y; - cin >> x >> y; - del_circu(x, y); - } - for (int i = 1; i <= k2; i++) { - int x, type; - cin >> type >> x; - del_linear(type, x); - } - - //out(); - - // for (int i = 0; i <= n; i++) { - // for (int j = 0; j <= m; j++) - // cout << pos(i, j) << " "; - // cout << endl; - // } - - for (int i = 0; i <= n; i++) - for (int j = 0; j <= m; j++) - if (!st[i][j]) { - memset(state, 0, sizeof state); - build(i, j, pos(i, j), 0); - } - bfs(); - cout << pos(n, ed) << endl; - if (dist[pos(n, ed)]) - cout << "YES" << endl; - else - cout << "NO" << endl; -} diff --git a/blue_book/sh/tempo10.cpp b/blue_book/sh/tempo10.cpp deleted file mode 100644 index 07e257d..0000000 --- a/blue_book/sh/tempo10.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include -using namespace std; -typedef long long ll; -const int N = 20000002; -ll fac[N], mod = 1e9 + 7; -ll qpow(ll n, ll m) -{ - ll ans = 1; - for (; m; m >>= 1) { - if (m & 1) - ans = ans * n % mod; - n = n * n % mod; - } - return ans; -} -int main() -{ - int n; - scanf("%d", &n); - n = n / 2 + 1; - int m = 2 * n - 1; - fac[0] = 1; - for (int i = 1; i <= m; i++) - fac[i] = fac[i - 1] * i % mod; - ll ans = fac[m] * qpow(fac[n - 1], mod - 2) % mod * qpow(fac[n], mod - 2) % mod; - printf("%lld\n", ans); -} \ No newline at end of file diff --git a/blue_book/sh/tempo11.cpp b/blue_book/sh/tempo11.cpp deleted file mode 100644 index fb89afd..0000000 --- a/blue_book/sh/tempo11.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include -using namespace std; -typedef unsigned long long LL; -const LL MOD = 1000000007; -int main() -{ - LL n, ans = 1, now = 2; - cin >> n; - n--; - while (n) { - //cout<<"now: "<>= 1; - // cout<<"ans: "< -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace std; - -typedef long long ll; -typedef unsigned long long ull; -const int INF = 0x3f3f3f3f; -const int mod = 1e9 + 7; -const double eps = 1e-4; -typedef pair pii; -typedef pair pll; -//#define x first -//#define y second -#define iosf ios::sync_with_stdio(false), cin.tie(0), cout << fixed - -const int N = 1e6 + 5; -int n; -vector lis; -int idx; -int a[N], b[N]; -int f[N][21]; -int pos[N]; -void init() -{ - for (int j = 0; j < 20; j++) - for (int i = 1; i + (1 << j) - 1 <= lis.size(); i++) - if (!j) - f[i][j] = pos[i]; - else - f[i][j] = min(f[i][j - 1], f[i + (1 << j - 1)][j - 1]); -} -int query(int l, int r) -{ - int len = r - l + 1; - int k = log(len) / log(2); - return min(f[l][k], f[r - (1 << k) + 1][k]); -} -int find(int x) -{ - int l = 0; - int r = lis.size() - 1; - while (l < r) { - int mid = l + r >> 1; - if (lis[mid] >= x) - r = mid; - else - l = mid + 1; - } - return r + 1; -} -int main() -{ - iosf; - cin >> n; - for (int i = 1; i <= n; i++) { - cin >> a[i]; - lis.push_back(a[i]); - } - sort(lis.begin(), lis.end()); - lis.erase(unique(lis.begin(), lis.end()), lis.end()); - for (int i = n; i >= 1; i--) - a[i] = find(a[i]); - for (int i = 1; i <= n; i++) - if (!pos[a[i]]) - pos[a[i]] = i; - init(); - int ans = 0; - int min_l = 1e6 + 19; - for (int r = n; r >= 1; r--) { - int l = r; - if (a[r] + 1 <= lis.size()) - l = query(a[r] + 1, lis.size()); - if (r < min_l) - ans++; - if (l < min_l) - min_l = l; - } - cout << ans << endl; -} \ No newline at end of file diff --git a/blue_book/sh/tempo2.cpp b/blue_book/sh/tempo2.cpp deleted file mode 100644 index f1770ee..0000000 --- a/blue_book/sh/tempo2.cpp +++ /dev/null @@ -1,94 +0,0 @@ -#include -#include -#include -#include - -using namespace std; - -struct Sample -{ - int label, pred; - double score; -}; - -void fuseMatrix(vector &samples, double &tpr, double &fpr) -{ - int tp = 0, fp = 0, tn = 0, fn = 0; - for (int i = 0; i < samples.size(); i++) { - if (samples[i].label == samples[i].pred) { - if (samples[i].pred == 1) { - tp++; - } else { - tn++; - } - } else { - if (samples[i].pred == 1) { - fp++; - } else { - fn++; - } - } - } - tpr = tp / (double)(tp + fn); - fpr = fp / (double)(tn + fp); - cout << tp << " " << fp << " " << tn << " " << fn << endl; -} - -bool compare(Sample A, Sample B) -{ - return A.score < B.score; -} - -int main() -{ - // cout<<"hello world\n"; - // 读取数据 - int num_sample = 0; - cin >> num_sample; - vector samples(num_sample); - char c; - for (int i = 0; i < num_sample; i++) { - cin >> c >> samples[i].score; - if (c == '+') { - samples[i].label = 1; - } else { - samples[i].label = 0; - } - } - sort(samples.begin(), samples.end(), compare); - - // for(int i=0; i fprs(num_sample); - vector tprs(num_sample); - for (int i = 0; i < num_sample; i++) { - //做预测 - for (int j = 0; j < num_sample; j++) { - if (samples[j].score < samples[i].score) { - samples[j].pred = 0; - } else { - samples[j].pred = 1; - } - } - //计算fpr, tpr - cout << samples[i].score << endl; - fuseMatrix(samples, tprs[i], fprs[i]); - } - // 计算面积 - // for(int i=0; i -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace std; - -typedef long long ll; -typedef unsigned long long ull; -const int INF = 0x3f3f3f3f; -const int mod = 1e9 + 7; -const double eps = 1e-4; -typedef pair pii; -typedef pair pll; -//#define x first -//#define y second -#define iosf ios::sync_with_stdio(false), cin.tie(0), cout << fixed - -const int N = 1e6 + 5; - -int n; -int cnt1, cnt2; -double tprs[N], fprs[N]; -vector list, po, ne; - -int main() -{ - scanf("%d", &n); - - for (int i = 0; i < n; i++) { - char c; - int x; - scanf("%c%d", &c, &x); - if (c == '+') - po.push_back(x); - else - ne.push_back(x); - list.push_back(x); - } - sort(list.begin(), list.end()); - sort(po.begin(), po.end()); - sort(ne.begin(), ne.end()); - int idx = 0; - for (int i = 0; i < list.size(); i++) { - int key = list[i]; - int fn = lower_bound(po.begin(), po.end(), key) - po.begin(); - int tp = po.size() - fn; - int tn = lower_bound(ne.begin(), ne.end(), key) - ne.begin(); - int fp = ne.size() - tn; - tprs[++idx] = tp / (double)(tp + fn); - fprs[idx] = fp / (double)(tn + fp); - } - - double ans = 0; - - for (int i = 1; i < idx; i++) - ans += (fprs[i] - fprs[i + 1]) * tprs[i + 1]; - - printf("%.10lf", ans); -} \ No newline at end of file diff --git a/blue_book/sh/tempo4.cpp b/blue_book/sh/tempo4.cpp deleted file mode 100644 index 46d7794..0000000 --- a/blue_book/sh/tempo4.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/* - Problem Name: - algorithm tag: -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace std; - -typedef long long ll; -typedef unsigned long long ull; -const int INF = 0x3f3f3f3f; -const int mod = 1e9 + 7; -const double eps = 1e-4; -typedef pair pii; -typedef pair pll; -//#define x first -//#define y second -#define iosf ios::sync_with_stdio(false), cin.tie(0), cout << fixed -const int N = 3e5 + 5; - -int n, m, k; -ll f[N]; -int a[505], b[505], c[505]; -int d[N]; - -int bs(int x) -{ - int l = 1, r = 3e5; - while (l < r) { - int mid = l + r >> 1; - if (d[mid] >= x) - r = mid; - else - l = mid + 1; - } - return l; -} - -int main() -{ - iosf; - cin >> n >> m >> k; - - for (int i = 1; i <= n; i++) - cin >> a[i] >> b[i] >> c[i]; - int sum = 0; - for (int i = 1; i <= m; i++) { - int x, y; - cin >> x >> y; - d[x] = y; - sum += y; - } - for (int i = 1; i <= 3e5; i++) - d[i] += d[i - 1]; - f[0] = 0; - for (int i = 1; i <= sum; i++) { - int day = bs(i); - f[i] = f[i - 1] + k; - for (int j = 1; j <= n; j++) { - int r = d[day]; - int l = d[max(0, day - a[j])]; - while (l < r) { - int mid = l + r >> 1; - if (mid >= i - b[j]) - r = mid; - else - l = mid + 1; - } - if (l >= i - b[j]) - f[i] = min(f[i], f[l] + c[j]); - } - } - - cout << f[sum] << endl; -} \ No newline at end of file diff --git a/blue_book/sh/tempo5.cpp b/blue_book/sh/tempo5.cpp deleted file mode 100644 index de9be01..0000000 --- a/blue_book/sh/tempo5.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include -#define pi pair -#define X first -#define Y second -using namespace std; -typedef long long ll; -const int M = 300050, N = 504; -ll dp[M]; -int day[M]; -int d[N], k[N], c[N], cnt = 0; -int main() -{ - //freopen("r.txt","r",stdin); - int n, m, r, p, q; - scanf("%d %d %d", &n, &m, &r); - for (int i = 1; i <= n; i++) - scanf("%d %d %d", &d[i], &k[i], &c[i]); - for (int i = 1; i <= m; i++) { - scanf("%d %d", &p, &q); - for (int j = 1; j <= q; j++) - day[++cnt] = p; - } - sort(day + 1, day + cnt + 1); - //把每辆自行车的使用日期排序。这段时间一共使用了cnt辆自行车。 - for (int j = 1; j <= cnt; j++) - dp[j] = 1ll * j * r; - //dp[i][j]表示使用了前i种优惠券,用了前k辆自行车的价钱。 - //dp[0][j]数组初始化为什么优惠券都不使用时的价格,也就是dp[0][j]=j*r。其中dp[0][0]=0。 - for (int i = 1; i <= n; i++) { - //dp[i][j]=min{dp[i][k]+c[i]},其中k满足day[j]-day[k+1]+1<=d[i] and j-k<=k[i]。 - // and前面表示优惠券最多能用d[i]天,后面的则表示最多能花在k[i]辆车上。 - deque q; - q.push_back(0); - for (int j = 1; j <= cnt; j++) { - //这个dp用单调队列优化即可。 - while (!q.empty() && (j - q.front() > k[i] || day[j] - day[q.front() + 1] + 1 > d[i])) - q.pop_front(); - dp[j] = min(dp[j], dp[q.front()] + c[i]); - while (!q.empty() && dp[j] <= dp[q.back()]) - q.pop_back(); - q.push_back(j); - } - } - printf("%lld\n", dp[cnt]); //dp[n][cnt]。 -} diff --git a/blue_book/sh/tempo6.cpp b/blue_book/sh/tempo6.cpp deleted file mode 100644 index 70e91b8..0000000 --- a/blue_book/sh/tempo6.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - Problem Name: - algorithm tag: -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace std; - -typedef long long ll; -typedef unsigned long long ull; -const int INF = 0x3f3f3f3f; -const int mod = 1e9 + 7; -const double eps = 1e-4; -typedef pair pii; -typedef pair pll; -//#define x first -//#define y second -#define iosf ios::sync_with_stdio(false), cin.tie(0), cout << fixed - -const int M = 300050, N = 505; -ll f[M], dp[M]; -int n, m, r; -int day[M]; -int d[N], k[N], c[N], idx = 0; -int q[M]; -bool mp[M]; -vector days; -int main() -{ - scanf("%d %d %d", &n, &m, &r); - for (int i = 1; i <= n; i++) - scanf("%d %d %d", &d[i], &k[i], &c[i]); - int sum = 0; - for (int i = 1; i <= m; i++) { - int x, y; - scanf("%d %d", &x, &y); - days.push_back({x, y}); - for (int j = 1; j <= y; j++) - day[++idx] = x; - } - sort(days.begin(), days.end()); - sort(day + 1, day + idx + 1); - - for (auto item : days) { - sum += item.second; - mp[sum] = 1; - } - - for (int i = 1; i <= idx; i++) - f[i] = 1ll * i * r; - k[n + 1] = 1, c[n + 1] = r; - - for (int i = 1; i <= idx; i++) - dp[i] = 1e17; - - for (int i = 1; i <= n + 1; i++) { - for (int j = 0; j <= idx; j++) - dp[j] = min(dp[j], dp[max(0, j - k[i])] + c[i]); - } - int last = 0; - for (int i = 1; i <= n; i++) { - int hh = 0, tt = 0; - for (int j = 1; j <= idx; j++) { - while (hh <= tt && (j - q[hh] > k[i] || day[j] - day[q[hh] + 1] + 1 > d[i])) - hh++; - f[j] = min(f[j], f[q[hh]] + c[i]); - if (mp[j] && i == n) { - int bag = j - last; - f[j] = min(f[j], f[last] + dp[bag]); - last = j; - } - while (hh <= tt && f[j] <= f[q[tt]]) - tt--; - q[++tt] = j; - } - } - printf("%lld\n", f[idx]); -} diff --git a/blue_book/sh/tempo7.cpp b/blue_book/sh/tempo7.cpp deleted file mode 100644 index a0ca068..0000000 --- a/blue_book/sh/tempo7.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include -using namespace std; -typedef long long ll; -const int N = 100002; -int a[N], n, m, t; -int e[N]; -ll mod = 998244353; -ll ans = 0; -void dfs1(int f, int n) -{ - if (f == t) { - e[f] = n; - ans = (ans + n) % mod; - return; - } - for (int i = 0; i <= n; i++) { - e[f] = i; - dfs1(f + 1, n - i); - } -} -int solve(int n, int t) -{ - if ((n >> 4 & 1) && (n & 1)) - return mod - 87779794; - else if ((n & 1) == 0) - return '*'; - else - return 7; -} -int main() -{ - scanf("%d %d %d", &n, &t, &m); - for (int i = 1; i <= t; i++) - scanf("%d", &a[i]); - dfs1(1, n); - printf("%d\n", solve(n, t)); -} diff --git a/blue_book/sh/tempo8.cpp b/blue_book/sh/tempo8.cpp deleted file mode 100644 index 50d8082..0000000 --- a/blue_book/sh/tempo8.cpp +++ /dev/null @@ -1,69 +0,0 @@ -#include -using namespace std; -typedef long long ll; -const int N = 34, M = 100000; -int a[N], n; -int d[7], m[7]; -int dp[4][M + 4]; -int ans = 0x3f3f3f3f; -int shift(int pt, vector &v) -{ - vector tp = v; - v.clear(); - for (int i = 0; i < 4; i++) - if (tp[i]) - v.push_back(tp[i]); - while (pt <= n && v.size() < 4) - v.push_back(a[pt++]); - while (v.size() < 4) - v.push_back(0); - return pt; -} -void dfs(int p, vector v, int cost) -{ - if (cost >= ans) - return; - if (p > n && v[0] + v[1] + v[2] + v[3] == 0) { - ans = min(ans, cost); - return; - } - for (int k = 0; k < 4; k++) { - if (v[k] == 0) - break; - vector now = v; - int ncc = 0; - for (int i = 0; i <= k; i++) { - now[i] = 0; - ncc += dp[i][v[i]]; - } - int x = shift(p, now); - dfs(x, now, cost + ncc); - } - for (int k = 0; k < 4; k++) { - v[k] = max(v[k] - 40000, 0); - } - int x = shift(p, v); - dfs(x, v, cost + m[4]); -} -int main() -{ - //freopen("r.txt","r",stdin); - scanf("%d", &n); - for (int i = 0; i < 4; i++) - scanf("%d", &d[i]); - for (int i = 0; i < 5; i++) - scanf("%d", &m[i]); - for (int i = 1; i <= n; i++) - scanf("%d", &a[i]); - for (int j = 0; j <= M; j++) - dp[0][j] = ((j + d[0] - 1) / d[0]) * m[0]; - for (int i = 1; i < 4; i++) { - for (int j = 1; j < d[i]; j++) - dp[i][j] = min(dp[i - 1][j], m[i]); - for (int j = d[i]; j <= M; j++) - dp[i][j] = min(dp[i - 1][j], dp[i][j - d[i]] + m[i]); - } - vector v{a[1], a[2], a[3], a[4]}; - dfs(5, v, 0); - printf("%d\n", ans); -} \ No newline at end of file diff --git a/blue_book/sh/tempo9.cpp b/blue_book/sh/tempo9.cpp deleted file mode 100644 index f847dfd..0000000 --- a/blue_book/sh/tempo9.cpp +++ /dev/null @@ -1,149 +0,0 @@ -/* - Problem Name: - algorithm tag: -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace std; - -typedef long long ll; -typedef unsigned long long ull; -const int INF = 0x3f3f3f3f; -const int mod = 1e9 + 7; -const double eps = 1e-4; -typedef pair pii; -typedef pair pll; -#define x first -#define y second -#define iosf ios::sync_with_stdio(false), cin.tie(0), cout << fixed - -const int N = 20, M = N * N + N; - -int n, m, q; -int fa1[M], fa2[M], fa3[M]; -string g[N]; -int st[M]; - -int find(int x, int fa[]) -{ - if (x != fa[x]) - fa[x] = find(fa[x], fa); - return fa[x]; -} - -int pos(int x, int y) -{ - return x * m + y; -} - -void bfs(int x, int y, int t) -{ - queue q; - q.push({x, y}); - - while (q.size()) { - auto u = q.front(); - q.pop(); - - if (t == 1) { - int a = u.x + 1, b = u.y; - if (a >= n || b >= m || a < 0 || b < 0 || g[a][b] == '1') - continue; - if (!st[pos(a, b)]) { - q.push({a, b}); - st[pos(a, b)] = 1; - } - int pa = find(pos(u.x, u.y), fa1), pb = find(pos(a, b), fa1); - if (pa != pb) - fa1[pb] = pa; - } else if (t == 2) { - int a = u.x, b = u.y + 1; - if (a >= n || b >= m || a < 0 || b < 0 || g[a][b] == '1') - continue; - if (!st[pos(a, b)]) { - q.push({a, b}); - st[pos(a, b)] = 1; - } - int pa = find(pos(u.x, u.y), fa2), pb = find(pos(a, b), fa2); - if (pa != pb) - fa2[pb] = pa; - } else { - int a = u.x + 1, b = u.y; - if (a < n && b < m && a >= 0 && b >= 0 && g[a][b] != '1') { - if (!st[pos(a, b)]) { - q.push({a, b}); - st[pos(a, b)] = 1; - } - int pa = find(pos(u.x, u.y), fa3), pb = find(pos(a, b), fa3); - if (pa != pb) - fa3[pb] = pa; - } - a = u.x, b = u.y + 1; - if (a < n && b < m && a >= 0 && b >= 0 && g[a][b] != '1') { - if (!st[pos(a, b)]) { - q.push({a, b}); - st[pos(a, b)] = 1; - } - int pa = find(pos(u.x, u.y), fa3), pb = find(pos(a, b), fa3); - if (pa != pb) - fa3[pb] = pa; - } - } - } -} - -int main() -{ - iosf; - cin >> n >> m; - for (int i = 1; i <= N * N; i++) - fa1[i] = fa2[i] = fa3[i] = i; - - for (int i = 0; i < n; i++) - cin >> g[i]; - - for (int k = 1; k <= 3; k++) { - memset(st, 0, sizeof st); - for (int i = 0; i < n; i++) - for (int j = 0; j < n; j++) - if (!st[pos(i, j)] && g[i][j] == '0') - bfs(i, j, k); - } - - cin >> q; - while (q--) { - int t, x1, y1, x2, y2; - cin >> t >> x1 >> y1 >> x2 >> y2; - x1--, y1--, x2--, y2--; - if (t == 1) { - int pa = find(pos(x1, y1), fa1), pb = find(pos(x2, y2), fa1); - if (pa == pb) - cout << "Y" << endl; - else - cout << "N" << endl; - } else if (t == 2) { - int pa = find(pos(x1, y1), fa2), pb = find(pos(x2, y2), fa2); - if (pa == pb) - cout << "Y" << endl; - else - cout << "N" << endl; - } else { - int pa = find(pos(x1, y1), fa3), pb = find(pos(x2, y2), fa3); - if (pa == pb) - cout << "Y" << endl; - else - cout << "N" << endl; - } - } - - return 0; -} \ No newline at end of file