Barbu

Description
program

Please download to get full document.

View again

of 3
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Information
Category:

Documents

Publish on:

Views: 0 | Pages: 3

Extension: TXT | Download: 0

Share
Transcript
  //#include <bits/stdc++.h>////using namespace std;////ifstream f( ramen.in );//ofstream g( ramen.out );////const int N = (<<!)+;//const int infinit = <<;////int n$ %$ tp&N'$ po&N'$ &N'$ i$ $ sol&N'$tma&*N'$tmin&*N'$cauta(int$int);////bool crit(int u$int ,)-return maepair(po&u'$tp&u')<=maepair(po&,'$tp&,');0////int main()//-// f >> n >> %;//// for(i = ; i <= n; i++)// -// f >> tp&i' >> po&i';// &i'=i;// 0// sort(+$+n+$crit);// =;1hile(<n)=*;// 22;// for(i=;i<=n;i++)tma&+i'=tp&i'+%;// sort(tma++$tma++n+);// cop3(tma++$tma++n+$tmin++);// for(i=;i>=;i22)-tmin&i'=tmin&*i';tma&i'=tma&*i+';0// for(i=;i<=n;i++)// sol&&i''=cauta($tp&&i''2po&&i'')+po&&i'';// for(i=;i<=n;i++)// g<<sol&i'<<45n4;// return ;//0//int cauta(int nod$int timp)//-// int st$dr$ret;// if(6tmin&nod')return infinit;// if(tma&nod'==tmin&nod')// -// ret=tma&nod';// tma&nod'=tmin&nod'=;// return ret;// 0// st=*nod;dr=st+;// if(6tmin&st')// -// ret=cauta(dr$timp);// tmin&nod'=tmin&dr';// tma&nod'=tma&dr';// return ret;// 0// if(6tmin&dr')// -// ret=cauta(st$timp);// tmin&nod'=tmin&st';// tma&nod'=tma&dr';  // return ret;// 0// if(tma&st'>=timp)// ret=cauta(st$timp);// else// ret=cauta(dr$timp);// if(6tmin&st')-tmin&nod'=tmin&dr';tma&nod'=tma&dr';0else// if(6tmin&dr')-tmin&nod'=tmin&st';tma&nod'=tma&st';0else// -tmin&nod'=tmin&st';tma&nod'=tma&dr';0// return ret;//0#include <bits/stdc++.h>using namespace std;ifstream f( ramen.in );ofstream g( ramen.out );const int N = ;int n$ %$ tp$ po$ i$ sol&N';set< tuple < int$ int$ int > > clienti;set< int > farfurii;int main()- f >> n >> %; for(i = ; i <= n; i++) - f >> tp >> po; clienti.insert(maetuple(po$ tp$ i)); farfurii.insert(tp); 0 for(auto it7clienti) - tie(po$ tp$ i)=it; set<int>77iterator 8% = farfurii.lo1erbound(tp 2 po 2 %); sol&i' = 8% + % + po; farfurii.erase(8%); 0 for(i = ; i <= n; i++) g << sol&i' <<45n4; return ;0#include <fstream>#include<set>#include<tuple>using namespace std;ifstream fin( ramen.in );ofstream fout( ramen.out );set<int> f;set<tuple<int$int$int> > a;int n$d$timp$po$i$sol&9';int main()- fin>>n>>d; for(i=;i<=n;i++)-   fin>>timp>>po; a.insert(maetuple(po$timp$i)); f.insert(timp); 0 fin.close(); set<tuple<int$int$int> >77iterator it; set<int>77iterator :t; for(it=a.begin();it6=a.end();it++)- tie(po$timp$i)=it; :t=f.lo1erbound(timp2po2d); sol&i'=:t+po+d; f.erase(:t); 0 for(i=;i<=n;i++) fout<<sol&i'<<45n4; fout.close(); return ;0
Related Search
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks