C Archive

Codeforces Round #473 (Div. 2), problem: (B) Mahmoud and Ehab and the message Solution In C/C++

Codeforces Round #473 (Div. 2), problem: (B) Mahmoud and Ehab and the message Solution In C/C++

#include<bits/stdc++.h> using namespace std; map<string,int> ms; string str; int arr,temp,mn; int main() { int n,k,m;cin>>n>>k>>m; for(int i=1;i<=n;i++)cin>>str,ms=i; for(int i=1;i<=n;i++)cin>>arr,mn=1e9+7; for(int i=1,j;i<=k;i++) { int x;cin>>x; while(x–)cin>>j,temp=i,mn=min(mn,arr); } unsigned long long res=0; while(cin>>str){res+=mn]];} return cout<<res<<“\n”,0; }
Codeforces Round #444 (Div. 2), problem: (E) Little Brother Solution In C/C++

Codeforces Round #444 (Div. 2), problem: (E) Little Brother Solution In C/C++

#include<iostream> #include<cstdio> #include<cstring> #include<string> #include<cmath> #include<algorithm> #include<cstdlib> #define eps 1e-7 using namespace std; double x,y,r,L; struct node{double l,r;}a; struct P{double x,y;}A,B,M,s,O,p; int n; inline double dis(P a,P b){return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y));} inline P operator-(P a,P b){return (P){a.x-b.x,a.y-b.y};} …