#include <bits/stdc++.h>
#define ls p<<1
#define rs p<<1|1
#define PII pair<int, int>
#define ll long long
#define db double
#define ull unsigned long long
#define endl '\n'
#define io ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
const int N = 2e5 + 10;
int t, n;
int a[N], sum[N], b[N];
void solve()
{
string a, b;
cin >> a;
for(int i = 0; i < a.size(); ++ i) a[i] = tolower(a[i]);
cout << a;
}
int main()
{
io
// freopen("1.in", "r", stdin);
// cin >> t;
// while(t --)
solve();
return 0;
}
#include <bits/stdc++.h>
#define ls p<<1
#define rs p<<1|1
#define PII pair<int, int>
#define ll long long
#define db double
#define ull unsigned long long
#define endl '\n'
#define io ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
const int N = 2e5 + 10;
int t, n;
int a[N], sum[N], b[N], ans;
map<int, int>mp;
void solve()
{
int a, b; cin >> a >> b;
for(int i = b; i > a; -- i)
{
bool success = true;
for(int j = 2; j <= a && j * j <= i; ++ j)
{
if(i % j == 0)
{
success = false;
break;
}
}
if(success)
{
cout << i << endl;
return;
}
}
cout << -1 << endl;
}
int main()
{
io
// freopen("1.in", "r", stdin);
// cin >> t;
// while(t --)
solve();
return 0;
}
#include <bits/stdc++.h>
#define ls p<<1
#define rs p<<1|1
#define PII pair<int, int>
#define ll long long
#define db double
#define ull unsigned long long
#define endl '\n'
#define io ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define INF 0x3f3f3f3f
using namespace std;
const int N = 1e5 + 10;
int t, n, m, q;
int fa[N], d[510][510], id[N];
int find(int x)
{
if(x == fa[x]) return x;
return fa[x] = find(fa[x]);
}
bool check()
{
for(int i = 2; i <= n; ++ i)
if(id[i] == id[i - 1] && find(i) != find(i - 1)) return false;
return true;
}
void solve()
{
cin >> n >> m >> q;
for(int i = 1; i <= n; ++ i) fa[i] = i;
memset(d, 0x3f, sizeof(d));
for(int i = 1, j = 1; i <= q; ++ i)
{
int cnt; cin >> cnt;
while(cnt --) id[j ++] = i;
}
for(int i = 1; i <= m; ++ i)
{
int x, y, w; cin >> x >> y >> w;
if(!w) fa[find(x)] = find(y);
x = id[x], y = id[y];
d[y][x] = d[x][y] = min(d[x][y], w);
}
if(!check())
{
cout << "No" << endl;
return;
}
for(int k = 1; k <= q; ++ k)
for(int i = 1; i <= q; ++ i)
for(int j = 1; j <= q; ++ j)
{
d[i][j] = min(d[i][j], d[i][k] + d[k][j]);
if(i == j) d[i][j] = d[j][i] = 0;
}
cout << "Yes" << endl;
for(int i = 1; i <= q; ++ i)
{
for(int j = 1; j <= q; ++ j)
{
int dist = d[i][j];
if(dist == INF) cout << -1 << ' ';
else cout << dist << ' ';
}
cout << endl;
}
}
int main()
{
io
// freopen("1.in", "r", stdin);
// cin >> t;
// while(t --)
solve();
return 0;
}
标签:周赛,return,cout,int,long,132,tie,define,Acwing
From: https://www.cnblogs.com/cxy8/p/17873747.html