Por que o Google Trends te ajuda a antecipar estratégias de marketing digital

By |2017-07-29T01:14:37+00:00July 29th, 2017|Categories: Uncategorized|Tags: , , , , , , , , , , , , , , , , , , |

Eduardo Caballero, da GhFly, explica que o Google Trends é uma grande base de dados do Google sobre o comportamento do usuário. Ele também comenta sobre as funcionalidades da ferramenta. ➤ Confira aqui a agenda dos próximos eventos: http://bit.ly/2o8JP3W ✩ Fique por dentro das [...]

Codeforces Round #422 (Div. 2), problem: (F) Madness Solution In C/C++

By |2017-07-25T09:06:25+00:00July 25th, 2017|Categories: C/C++, Programming|Tags: , , , , , , , |

#include<cstdio> #include<cstdlib> #include<stdlib.h> #include<iostream> #include<string> #include<string.h> #include<vector> #include<stack> #include<queue> #include<map> #include<cmath> using namespace std; #define pi acos(-1.0) typedef long long ll; typedef double db; const int MAXN = 105; vector<pair<int, int> >e[MAXN]; int fa[MAXN], id[MAXN]; db t[MAXN]; void dfs(int u){ db now=t[u], add=2.0/e[u].size(); for(int [...]

Codeforces Round #422 (Div. 2), problem: (E) Liar Solution In C/C++

By |2017-07-25T09:04:16+00:00July 25th, 2017|Categories: C/C++, Programming|Tags: , , , , , , , |

#include<bits/stdc++.h> typedef long long ll; const int N=100010; const ll mo=1000000007; int n,x,i,l,r,m,mid,g[N][35],j,k; ll hs[N],ht[N],q[N]; char s[N],t[N]; inline ll hashs(int l,int r){ return (hs[r]-hs[l-1]*q[r-l+1]%mo+mo)%mo; } inline ll hasht(int l,int r){ return (ht[r]-ht[l-1]*q[r-l+1]%mo+mo)%mo; } inline int lcp(int i,int j){ if(s[i]!=t[j])return 0; l=1; if(m-j<n-i)r=m-j+1; else r=n-i+1; [...]

Codeforces Round #422 (Div. 2), problem: (D) My pretty girl Noora Solution In C/C++

By |2017-07-25T09:02:47+00:00July 25th, 2017|Categories: C/C++, Programming|Tags: , , , , , , , |

#include<bits/stdc++.h> using namespace std; long long f[5000010],pwr[5000010],mod=1e9+7,t,r,l,ans; main() { int i,j,k; cin>>t>>l>>r; pwr[0]=1; //for(i=1;i<=r-l+1;i++)pwr[i]=(1ll*pwr[i-1]*t)%mod; for(i=0;i<=r;i++) f[i]=1e18; f[1]=0; for(i=1;i<=r;i++) { for(j=2*i,k=2;j<=r;j+=i,k++) { f[j]=min(f[j],(1ll*i*(k-1)*k)/2+f[i]); } } ans=0;long long pr=1; for(i=l;i<=r;i++) ans=(ans+((f[i])%mod*pr)%mod)%mod,pr=(pr*t)%mod; cout<<ans<<endl; }

Codeforces Round #422 (Div. 2), problem: (C) Hacker, pack your bags Solution In C/C++

By |2017-07-25T09:01:08+00:00July 25th, 2017|Categories: C/C++, Programming|Tags: , , , , , , , , |

#include<cstdio> #include<vector> #include<cstring> #include<algorithm> #define ll long long using namespace std; ll ans,c[200101],n,x,L,R,cc; vector<pair<ll,ll> >l[200101],r[200101]; int main(){ scanf("%lld%lld",&n,&x); for(int i=1;i<=n;i++){ scanf("%lld%lld%lld",&L,&R,&cc); l[L].push_back(make_pair(R-L+1,cc)); r[R].push_back(make_pair(R-L+1,cc)); } memset(c,0x3f3f,sizeof(c));ans=c[0]; for(int i=1;i<200100;i++){ for(int j=0;j<l[i].size();j++)l[i][j].first>=x?0:ans=min(ans,c[x-l[i][j].first]+l[i][j].second); for(int j=0;j<r[i].size();j++)c[r[i][j].first]=min(c[r[i][j].first],r[i][j].second); } printf("%lld",ans==c[0]?-1:ans); return 0; }

Codeforces Round #422 (Div. 2), problem: (B) Crossword solving Solution In C/C++

By |2017-07-25T08:59:31+00:00July 25th, 2017|Categories: C/C++, Programming|Tags: , , , , , , , |

#include<bits/stdc++.h> using namespace std; int n,m,i,j,c,a=2e9,ai; string s,t; int main(){ cin>>n>>m>>s>>t; for(i=0;i<=m-n;i++) { for(c=j=0;j<n;j++) t[i+j]==s[j]?0:c++; c<a?a=c,ai=i:0; } cout<<a<<endl; for(c=j=0;j<n;j++) t[ai+j]!=s[j]?cout<<j+1<<" ",0:0; }

Codeforces Round #422 (Div. 2), problem: (A) I’m bored with life Solution In C/C++

By |2017-07-25T08:58:09+00:00July 25th, 2017|Categories: C/C++, Programming|Tags: , , , , , , , |

#include<iostream> using namespace std; int a,b; int main(){ cin>>a>>b; a=a<b?a:b; for(b=a;--a;)b*=a; cout<<b; }

Codeforces Round #425 (Div. 2), problem: (E) Vasya and Shifts Solution In C/C++

By |2017-07-25T01:21:36+00:00July 25th, 2017|Categories: C/C++, Programming|Tags: , , , , , , , |

#include<bits/stdc++.h> #define oo 0x3f3f3f3f #define cl(x) memset(x, 0, sizeof(x)) #define mp make_pair #define fr first #define sc second #define pii pair<int, int> #define pb push_back #define mo 1000000007 #define maxn 510 typedef long long ll; using namespace std; void gn(int &x) { x = [...]

Codeforces Round #425 (Div. 2), problem: (D) Misha, Grisha and Underground Solution In C/C++

By |2017-07-25T01:18:21+00:00July 25th, 2017|Categories: C/C++, Programming|Tags: , , , , , , , , |

#include<cstdio> #include<iostream> using namespace std; struct Edge{ int to,next; }e[202020]; int head[101010],cnt=0; void add(int u,int v) { cnt++; e[cnt].to=v; e[cnt].next=head[u]; head[u]=cnt; } int anc[20][101010]; int dep[101010]; void dfs(int x,int fa) { for(int i=head[x];i!=0;i=e[i].next) { int to=e[i].to; if(to!=fa) { dep[to]=dep[x]+1; anc[0][to]=x; dfs(to,x); } } } [...]

Codeforces Round #425 (Div. 2), problem: (C) Strange Radiation Solution In C/C++

By |2017-07-25T01:16:19+00:00July 25th, 2017|Categories: C/C++, Programming|Tags: , , , , , , , |

#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using D = double; using uint = unsigned int; template<typename T> using pair2 = pair<T, T>; #ifdef WIN32 #define LLD "%I64d" #else #define LLD "%lld" #endif #define pb push_back [...]