Tên đăng nhập Điểm ▾ Bài tập Giới thiệu
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1

ok

25101 201 1
25101 201 1
25101 201 1
25101 201 1

no

25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1

have a great sense of humor

25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1

include <iostream>

using namespace std;

int main()
{
long long x,n;
cin >> n >> x;
long long a[n];
for (int i=0;i<n;i++) { cin >> a[i];
}
long long l=0,r=n-1;
while (l<r) { if (a[l]+a[r]==x) { break; } else if (a[l]+a[r]>x)
{
r--;
}
else
{
l++;
}
}
if (l<r)
{
cout << l+1 << " " << r+1;
}
else
{
cout << "No solution";
}
return 0;
}

25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1

include<stdio.h>

// i == 2 || i == 4 ||
int x[100];
int a[1000];
int d = 0;

void check(int n){
int i;
int num = 0;
int d0 = 0;
int d1 = 0;
for( i = 1; i <= n; i++){
if( x[i] == 0 ){
d0++;
num = num10+4;
}
if( x[i] == 1 ){
d1++;
num = num
10+7;
}
}
if( d0 == d1 ){
d++;
a[d] = num;
}
}
void Try(int i,int n){
int j;
for( j = 0; j <= 1; j++ ){
x[i] = j;
if( i == n ) check(n);
if(i < 8 )Try(i+1,n);
}
}

int main(){
int i;
int n;
Try(1,2);
Try(1,4);
Try(1,6);
Try(1,8);
//for( i = 1; i <= d; i++) printf("%d\n", a[i]);
scanf("%d",&n);
if( n > a[d]) printf("4444477777");
else{
int r = d;
int l = 1;
int mid = (int)(l+r)/2;
while( l != r ){
int mid = (int)(l+r)/2;
if( n > a[mid] ){
if( n <= a[mid+1] ){
printf("%d", a[mid+1]);
break;
}
else l = mid;
}
else{
if( n > a[mid-1] ){
printf("%d", a[mid]);
break;
}
else r = mid;
}
}
}
return 0;
}

25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1

include<bits/stdc++.h>

define ll long long

using namespace std;
string s;
ll n;
ll kt(ll l, ll r)
{
while (s[l]==s[r]&&l>=0&&r<n) { l--; r++; } return r - l - 1; } ll e=0,m; int main() { freopen("EVENPAL.INP", "r", stdin); freopen("EVENPAL.OUT", "w", stdout); cin >> m;
while(m--)
{
cin>>s;
ll d = 1;
e=0;
n=s.size();
for (ll i = 1; i <n; i++)
if (s[i-1]==s[i])
{
d = max(d, kt(i - 1, i));
if(d%2==0)
{
e=1;
cout<<"YES"<<endl;
break;
}
}

    if(e!=1)
for (ll i = 2; i <n; i++)
    if (s[i-2]==s[i])
    {
        d = max(d, kt(i - 2, i));
        if(d%2==0)
        {
            e=1;
            cout<<"YES"<<endl;
           break;
        }
    }
   if(e==0) cout<<"NO"<<endl;}

}

25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101
hoangkimdung1234
hoàng thị cẩm ly
201 1
25101 201 1
25101 201 1
25101 201 1

only one

25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1

hihi

25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1
25101 201 1