Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
#include
//#include
#include
using namespace std; int rastojanie(int a, int b) { return abs(a-b); } string levo_ili_desno(pair
platforma, pair
otsecka) { if(otsecka.first
platforma; cin>>N>>L; vector
> otsecka; platforma.first = 0; platforma.second = L; for(int i = 0; i
>x>>y; otsecka.push_back(make_pair(x,y)); } int brojac = 0; for(int i = 0; i
platforma.second) { continue; } if(otsecka[i].first>=platforma.first and otsecka[i].second<=platforma.second) { brojac++; } else { if(levo_ili_desno(platforma,otsecka[i])=="levo") { if(rastojanie(platforma.first,otsecka[i].second)>=rastojanie(platforma.first,otsecka[i].first)) { brojac++; platforma.first = otsecka[i].first; } } else { if(rastojanie(otsecka[i].first,platforma.second)>=rastojanie(otsecka[i].second,platforma.second)) { brojac++; platforma.second = otsecka[i].second; } } } } cout<
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)