vladik专题

B - Vladik and Complicated Book(思维题)

Vladik had started reading a complicated book about algorithms containing n pages. To improve understanding of what is written, his friends advised him to read pages in some order given by permu

743C. Vladik and fractions codeforces

#include<bits/stdc++.h>using namespace std;int main(){int n;cin>>n;if(n==1)cout<<-1<<endl;elsecout<<n<<' '<<n+1<<' '<<n*(n+1)<<endl;return 0;}

743A. Vladik and flights codeforces

#include<bits/stdc++.h>using namespace std;char str[100005];int main(){int n,a,b;cin>>n>>a>>b;for(int i=1;i<=n;i++){cin>>str[i];}if(str[a]!=str[b]){cout<<1<<endl;}else{cout<<0<<endl;}return 0;}