Problem hidden
|This problem was hidden by Editorial Board member probably because it has incorrect language|version or invalid test data, or description of the problem is not clear.|

RGB7019 - Илэрхийлэл 1

Өгөгдсөн илэрхийллийн утгыг ол. A=B*C-D

Input

Нэг мөрөнд 3 бүхэл тоо нэг нэг зайгаар тусгаарлагдан өгөгдөнө.

Output

Илэрхийллийн нэг мөрөнд гарна.

Example

Input:
2 3 4

Output:
2

Нэмсэн:Bataa
Огноо:2013-01-01
Хугацааны хязгаарлалт:1s
Эх кодын хэмжээний хязгаарлалт:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Програмчлалын хэлүүд:ADA95 ASM32 BASH BF C NCSHARP CSHARP C++ 4.3.2 CPP C99 CLPS LISP sbcl LISP clisp D ERL FORTRAN HASK ICON ICK JAVA JS-RHINO JULIA LUA NEM NICE OCAML PAS-GPC PAS-FPC PERL PHP PIKE PRLG-swi PYTHON PYPY3 PYTHON3 RUBY SCALA SCM guile ST TCL WHITESPACE

hide comments
2024-04-08 03:39:02













































































































































































































































































































Last edit: 2024-04-08 03:39:41
2024-03-07 10:54:35
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mk make_pair
#define S second
#define F first
ll t, n;
pair < ll, ll > p[200045];
bool check( ll k ){
ll cl = 0, cr = 0;
for(int i = 1; i <= n; i ++ ){
cl = max( cl-k, 0LL );
cr = cr+k;
if( p[i].S < cl || cr < p[i].F ){
return false;
}
if( cl <= p[i].F && p[i].S <= cr ){
cl = p[i].F, cr = p[i].S;
continue;
}
if( p[i].F <= cl && p[i].S <= cr ){
cr = p[i].S;
continue;
}
if( cl <= p[i].F && cr <= p[i].S ){
cl = p[i].F;
continue;
}
if( cl <= p[i].F && p[i].S <= cr )
continue;
}
return true;
}
int main(){
ios_base::sync_with_stdio(NULL);
cin.tie(NULL);
cout.tie(NULL);
cin >> t;
string s;
while( t -- ){
cin >> n;
for(int i = 1; i <= n; i ++ )
cin >> p[i].F >> p[i].S;
ll l = 0, r = 1e9;
while( r-l >= 10 ){
ll mid = ( l+r ) / 2;
if( check( mid ) == 1 ){
r = mid;
}else{
l = mid;
}
}
for(int i = l; i <= r; i ++ ){
if( check(i) == 1 ){
cout << i << "\n";
break;
}
}
}
}
2024-01-17 08:15:59
Izoxme was here
2023-12-05 06:36:25


































































































































































































































































































































































































































































2023-11-13 08:34:02
.

Last edit: 2023-11-16 02:17:59
2023-11-02 12:13:30
#include<iostream>
using namespace std;
int main(){
long long k,n,w,a,i,b,c,d;
cin>>a;
b=a%10;
c=a%100/10;
d=a/100;
k=1;
if(b>0&&a%b>0){
k=0;
}
if(c>0&&a%c>0){
k=0;
}
if(d>0&&a%d>0){
k=0;
}
cout<<k;

}
2023-10-24 06:58:15
eggtuulsuga
2023-10-20 06:55:40
gomo sergelen love misheel
2023-10-16 10:14:40
#include <iostream>
#include <sstream>
#include <string>
#include <cstdlib>
#include <cmath>

using namespace std;

// Headers
string toString (double);
int toInt (string);
double toDouble (string);

int main() {
int a, d, b, c;

cin >> c;
d = (int) ((double) c / 10);
b = c % 10;
a = b * d;
cout << d << endl;
cout << b << endl;
cout << a << endl;
return 0;
}

// The following implements type conversion functions.
string toString (double value) { //int also
stringstream temp;
temp << value;
return temp.str();
}

int toInt (string text) {
return atoi(text.c_str());
}

double toDouble (string text) {
return atof(text.c_str());
}
2023-10-09 05:08:16
tom is monke
and 7-1 class gay tengis has crush on7-1 smol saraana

Last edit: 2023-10-09 05:09:01
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.