Please turn JavaScript on
Latest LCOJ Comments icon

Latest LCOJ Comments

Want to stay in touch with the latest updates from Latest LCOJ Comments? That's easy! Just subscribe clicking the Follow button below, choose topics or keywords for filtering if you want to, and we send the news to your inbox, to your phone via push notifications or we put them on your personal page here on follow.it.

Reading your RSS feed has never been easier!

Website title: Trang chủ - LCOJ: Luyencode Online Judge

Is this your feed? Claim it!

Publisher:  Unclaimed!
Message frequency:  3.95 / day

Message History

include <bits/stdc++.h>

using namespace std;

define ll long long

int f[10000005]; int s[10000005];

void sang(){ for(int i=2;i<=10000000;i++){ f[i]=1; } f[0]=f[1]=0; for(ll i=2;ii<=10000000;i++){ if(f[i]==1){ for(ll j=ii;j<=10000000;j+=i){ f[j]=0; } } } }

int main() { ios::syncwithstdio(0); cin.tie(0); cout...


Read full story

bài này thực chất chỉ là tìm max giữa hiệu 2 phần tử ~a_i~ và ~a_{i-2}~ thôi nhé

code tham khảo (C++)

#include"bits/stdc++.h" using namespace std; int main() { ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); int n; cin>>n; int a[n+1]; for(int i = 1; i <= n; ++i) cin>>a[i]; int ans = 0; for(int i = 3; i <= n; ++i) ans = max(ans...

Read full story

để in ra kí tự '/' ta có thể dùng cú pháp sau trong c++

"\\"

code tham khảo (C++)

#include"bits/stdc++.h" using namespace std; int main() { ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); int a, b, c; cin>>a>>b>>c; cout<<"users setClock "<<"\\"<<b<<"\\"<<a<<"\\"<<c; return 0; }

Read full story

FULL AC cho ae

#include<bits/stdc++.h> using namespace std; using ll=long long; int main() { cin.sync_with_stdio(0); cin.tie(0); cout.tie(0); ll a; cin>>a; ll k=sqrt(a); if(k*k==a) { cout << "YES"; return 0; } cout << "NO"; }

Read full story

Full AC cho ae

#include<bits/stdc++.h> using namespace std; using ll=long long; int main() { cin.sync_with_stdio(0); cin.tie(0); cout.tie(0); long double a,b; cin>>a>>b; if(a==0) { if(b==0) { cout << "WOW"; return 0; } else { cout << "NO"; return 0; } } cout << fixed << setprecision(2) << (long double)-b...

Read full story