摘要:
int read() { int a=0,x=1;char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-')x=-1;ch=getchar();} while(ch>='0'&&ch<='9'){a=a*10+ch-'0';ch=getchar();}
閱讀全文
摘要:
樹狀數(shù)組單點(diǎn)修改區(qū)間查詢 #include<iostream> using namespace std; int n,m; int tree[2000020]; int lowbit(int x) { return x&(-x); } void update(int x,int v) { while
閱讀全文
摘要:
#include <iostream> #include <cstdio> #include <cmath> #include <cstring> using namespace std; typedef long long ll; const int maxn = 1000000; const i
閱讀全文
摘要:
#include<iostream> #include<cstring> using namespace std; int main() { int t; cin>>t; string a,b; while(t--) { cin>>a>>b; if(a+b>b+a) { cout<<">"<<end
閱讀全文
摘要:
#include<iostream> #include<cstring> using namespace std; struct node { int v; int next; }edge[1010]; int dfn[1010],low[1010],heads[1010]; int cnt,vis
閱讀全文
摘要:
#include<iostream> using namespace std; int n,m,k,ans; int map[110][110]; int vis[110][110][110]; int main() { cin>>n>>m>>k; for(int i=1;i<=n;i++) { f
閱讀全文
摘要:
#include <iostream> using namespace std; int a,c; char b; int ans; int main() { cin>>a>>b>>c; if(a>12||a==0) { ans++; } if(a>12||a==0) { if(c>31) { an
閱讀全文
摘要:
#include <iostream> #include<cstring> using namespace std; int dp[1000050]; int main() { memset(dp,0x3f3f,sizeof dp); dp[1] = 1; int n; cin>>n; while(
閱讀全文
摘要:
#include<iostream> #include<algorithm> using namespace std; bool cmp(int x,int y) { return x>y; } int ans=2147483647,n,k; int t[1010],s[1010]; void df
閱讀全文
摘要:
#include<iostream> using namespace std; int a[50010],dp[50050]; int ans=-2147483647; int main() { int n; cin>>n; for(int i=1;i<=n;i++) { cin>>a[i]; dp
閱讀全文