uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
e8ab2b22-0f19-4b82-b549-279bd96810be | IlyaKK/Coursera-C- | Coursera_C++/evennumbers/src/evennumbers.cpp | #include <iostream>
using namespace std;
int main() {
int A, B;
cin>>A>>B;
for(int i=A; i<=B; ++i){
if(i%2==0){
cout<<i<<" ";
}
}
return 0;
}
| ALGO | 0.998622 | 3.033788 |
4ce562e9-72e7-4781-8bb1-9a7a8e90f885 | qzylalala/Improve | STL/字符串替换.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
string s, s1, s2;
while(getline(cin,s))
{
int flag;
s1 = "you";
s2 = "we";
flag = s.find(s1,0);
while(flag != string::npos)
{
s.replace(flag, 3, s2); // 3 Ϊ s1 ij
// string ... | ALGO | 0.998577 | 3.716514 |
90bf61c9-4f12-4c93-91aa-8f43ae021fae | aditya301cs/My_Daily_Practice_DSA | 1700-number-of-students-unable-to-eat-lunch/1700-number-of-students-unable-to-eat-lunch.cpp | class Solution {
public:
int countStudents(vector<int>& students, vector<int>& sandwiches) {
queue<int> q;
for(auto& i : students){
q.push(i);
}
short i = 0;
short lpCounter = 0;
while(i < sandwiches.size() && lpCounter < q.size()){
auto p = q... | ALGO | 0.999964 | 5.471161 |
f35ba0ef-0440-450b-be6d-bd94e441ca9e | nccaiteam/histopathology_annotation_nia | libs/boost_1_67_0/libs/polygon/example/gtl_custom_polygon.cpp | #include <boost/polygon/polygon.hpp>
#include <cassert>
#include <list>
namespace gtl = boost::polygon;
using namespace boost::polygon::operators;
//first lets turn our polygon usage code into a generic
//function parameterized by polygon type
template <typename Polygon>
void test_polygon() {
//lets construct a 10x1... | TEST | 0.955868 | 7.7346 |
3f7905ae-f7ea-4c47-8eee-2adaa329ac36 | pranav-kale-01/Problem-Solving | 0125-valid-palindrome/0125-valid-palindrome.cpp | class Solution {
public:
bool isPalindrome(string s) {
int l=0;
int r=s.size()-1;
while( l <= r ) {
if( !isalnum(s[l] ) ) {
l++;
continue;
}
if( !isalnum(s[r]) ) {
r--;
continue;
... | ALGO | 0.99978 | 6.4523 |
7efe35dd-4c25-47db-8a27-9a2841f99f2a | itkingnb/cf-atc-and-so-on | codeforces/1019.2/a.cpp | #include<bits/stdc++.h>
#define pii pair<int,int>
#define mii map<int,int>
#define msi map<string,int>
#define ll long long
#define all(x) (x).begin(), (x).end()
using namespace std;
int maxint = INT_MAX;// 2147483647
int minint = INT_MIN;// -2147483648
long long maxll = LLONG_MAX;// 9223372036854775807
long long minll... | ALGO | 0.999465 | 4.42352 |
280d0614-2f3c-4c70-97e4-02d6f109f729 | Dantovisk/Programacao-Competitiva | GEMA/ED/SegTree/Lazy Propagation/Bitwise OR and AND.cpp | #include <bits/stdc++.h> //Codeforces - Bitwise OR and AND
using namespace std;
//#define int long long int
#define MAXN 100010
int tree[4*MAXN];
int lazy[4*MAXN];
void unlazy(int no, int l, int r){
if(lazy[no] == 0) return;
tree[no] |= lazy[no];
if(r != l){
lazy [2*no] |= lazy[no];
... | ALGO | 0.999743 | 5.163628 |
3bb66743-3c17-4b0f-9227-db39ce3c4e30 | ploschka/OOP-2 | tasks/CalculatingMachine/main.cpp | #include <iostream>
#include <utility>
#include "CalcMachine.h"
#include "BigInteger.h"
#include "Parser.h"
#include "LoggerFactory.h"
#include "Stack.h"
int main()
{
FileLoggerFactory logfac;
ILogger* logger = logfac.createLogger("[CALC MACHINE]");
uint64_t startingNumber;
std::cout << "Enter the sta... | ALGO | 0.873597 | 5.458578 |
9a68cba8-2e36-4ff0-8c05-6a288bf23317 | BloodKrimson/Portfolio | C++Projects/IntroUnit/LABS/lab2/print-interval.cpp | /*
Author: Brandon Angos
Course: CSCI-135
Instructor: Tong Yi
Assignment: Lab2B
Description: program will ask for lower limit, int L, and upper one, int U,
which will then be used to print out the numbers from [L,U) through the help of
a while loop.
*/
#include <iostream>
using namespace std;
int main(){
int L,... | ALGO | 0.992326 | 3.509461 |
eb7251f8-8124-4410-a52a-50786e1556ad | cubox-i/android_frameworks_av | media/libstagefright/codecs/amrnb/enc/src/cor_h_x.cpp | /*----------------------------------------------------------------------------
; INCLUDES
----------------------------------------------------------------------------*/
#include "typedef.h"
#include "cnst.h"
#include "cor_h_x.h"
#include "basic_op.h"
/*------------------------------------------------------------------... | ALGO | 0.999932 | 4.849229 |
61cebd65-eec5-4617-8dde-d6b01912bf8d | nucleargezi/acm-icpc | codeforces/div1+2/2142 cf1036 -F2GHI/2124A.cpp | #include "MeIoN_Lib/Z_H/MeioN.hpp"
#include "MeIoN_Lib/MeIoN_all.hpp"
#include "MeIoN_Lib/IO/fmt.hpp"
#define tests
void Yorisou() {
LL(n);
VEC(ll, a, n);
meion b = a;
sort(b);
bool f = 1;
FOR(i, n) f &= a[i] != b[i];
if (f) iroha YES(), print("{}\n{}", n, a);
vector<int> v;
FOR(i, n) if (a[i] != b[i... | ALGO | 0.999895 | 3.741409 |
ab1dc0a5-c552-45ef-bace-74748bf407d4 | thuanpm23-it/Ecommerce_App | windows/runner/utils.cpp | #include "utils.h"
#include <flutter_windows.h>
#include <io.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
void CreateAndAttachConsole() {
if (::AllocConsole()) {
FILE *unused;
if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
_dup2(_fileno(stdout), 1);
}
if (freopen_s(&unuse... | TOOL | 0.998859 | 6.785645 |
b0a26c43-761e-4847-8ee7-92e1f76e8e8a | ishandutta2007/codeforces | kuroni/normal/279/B.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n,q,i=0,a[100000],ans=0,tmp=0,sum=0,cur=-1;
next(){sum -= a[i];i++;tmp--;}
add(){cur++;tmp++;sum+=a[cur];ans=max(ans,tmp);}
main()
{
cin>>n;
for (cin>>q;i<n;i++) cin>>a[i];
i=0;
while (i<n)
{
if ((sum+a[cur+1]<=q)&&(cur<n... | ALGO | 0.999941 | 3.175014 |
a6014ffd-1da9-4c29-9235-5df15109ba53 | AnuragJain23/DP-problems | dpkorderlcs.cpp | #include <bits/stdc++.h>
#include<stdio.h>
using namespace std;
#define ll long long
#define F(i,a,b) for(ll i=a;i<=b;i++)
ll dp[2002][2002][6],n,m;
ll a[2005],b[2005];
ll korderlcs(ll i , ll j , ll k)
{
if(i>=n||j>=m)
return 0;
if(dp[i][j][k]!=-1)
return dp[i][j][k];
ll res=0;
if(a[i]==b[j])
... | ALGO | 0.99999 | 3.743202 |
053db5bb-6444-4548-bea6-07197f3953ed | nirowu/leetcode-master | 0543-diameter-of-binary-tree/0543-diameter-of-binary-tree.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.999881 | 6.201564 |
39498d0e-a73e-48c5-95ee-3c647fa84f71 | wiih0p/William_Hopkirk_College_Career_Programs | cs140- Data Structures and Algorithms 1/lab10/src/bstree_notes.cpp | #include <vector>
#include <string>
#include <iostream>
#include <cstdio>
#include "bstree.hpp"
using namespace std;
using CS140::BSTree;
using CS140::BSTNode;
BSTree::BSTree()
{
sentinel = new BSTNode;
sentinel->left = NULL;
sentinel->right = sentinel;
sentinel->parent = NULL;
sentinel->key = "---SENTINEL--... | ALGO | 0.999173 | 4.656601 |
4b18427f-1bbd-478b-b7f0-0fdffc4dce70 | wzafar1/Portfolio | C++/Workshops/Workshop_5/in_lab/Fraction.cpp | /*
OOP244 Workshop 5: Fraction
File: Fraction.cpp
Version 1.0
Date: 15/06/2017
Author: wzafar1
Seneca Emial: <EMAIL>
*/
#include<iostream>
#include"Fraction.h"
namespace sict {
using namespace std;
Fraction::Fraction() {
setEmpty();
};
Fraction::Fraction(int num, int denom) {
if (num > 0 && denom... | TOOL | 0.872823 | 5.685271 |
3e24df62-44eb-45c7-9ff8-206848390e7f | javagovindsharma/leetscode | solution/2700-2799/2788.Split Strings by Separator/Solution.cpp | class Solution {
public:
vector<string> splitWordsBySeparator(vector<string>& words, char separator) {
vector<string> ans;
for (const auto& w : words) {
istringstream ss(w);
string s;
while (getline(ss, s, separator)) {
if (!s.empty()) {
... | ALGO | 0.999763 | 6.479049 |
07c2e4fd-e1a5-4c7a-b1b2-e3e08f5591c0 | bitblit11/Trick | trick_source/sim_services/Integrator/trick_algorithms/Euler_Integrator.cpp | #include "Euler_Integrator.hh"
#include "sim_services/Message/include/message_proto.h"
#include <iostream>
#include <stdlib.h>
/**
*/
void Trick::Euler_Integrator::initialize(int State_size, double Dt) {
if (verbosity) {
message_publish(MSG_DEBUG, "Trick::Euler_Integrator::initialize().\n") ;
}
... | ALGO | 0.998177 | 5.606237 |
04dada79-58a7-4572-a632-2e7f104d2931 | Ruchit-rt/fgpa_hardware_accelerateNN | dependencies/opencv-4.5.3/3rdparty/carotene/src/gaussian_blur.cpp | #include "common.hpp"
#include "saturate_cast.hpp"
#include "separable_filter.hpp"
namespace CAROTENE_NS {
bool isGaussianBlur3x3Supported(const Size2D &size, BORDER_MODE border)
{
return isSupportedConfiguration() && size.width >= 8 &&
(border == BORDER_MODE_CONSTANT ||
border == BORDER_MODE_... | ALGO | 0.971652 | 6.777441 |
fdb6ae17-da4d-4b92-b773-3ed394043dd8 | veera-nunna/NeuralNetworks | SelfOrganizingMaps/som.cpp | #include<iostream>
#include<cmath>
#include<fstream>
using namespace std;
float cal_dist(float x1,float y1,float x2,float y2)
{
float val=(x2-x1)*(x2-x1);
val=val+(y2-y1)*(y2-y1);
val=sqrt(val);
return val;
}
float activation(float d,float sig)
{
float val=exp(-(d*d)/2*(sig*sig));
return val;
}
int main()
... | ALGO | 0.999966 | 3.115132 |
bed76110-600b-4972-b806-282fb8af26ac | youngjep/hw6 | boggle.cpp | #ifndef RECCHECK
#include <iostream>
#include <vector>
#include <string>
#include <set>
#include <random>
#include <iomanip>
#include <fstream>
#include <exception>
#endif
#include "boggle.h"
std::vector<std::vector<char> > genBoard(unsigned int n, int seed)
{
//random number generator
std::mt19937 r(seed);
//scr... | TOOL | 0.982526 | 5.815113 |
ef230b87-49eb-47ec-8047-cf2f18a29105 | Ouan2551/POSN-Computer | work study posn/2.work-c++/question/1.Am-I-nervous.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
// input and setup
string txt; cin.ignore(0); getline(cin, txt);
int count = txt.size(); int small, big; small = big = 0;
char small_char[26] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'... | ALGO | 0.999969 | 5.073176 |
9c936f21-6573-4042-9b35-9839da5a5751 | yoshikiri/kyo-pro | atcoder/abc/166/e2.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
int main() {
int n;
cin >> n;
map<int, int> x, y;
rep(i, n){
int a; cin >> a;
++x[i + 1 + a];
++y[i + 1 - a];
}
ll ans = 0;
for(auto p: x){
ans += (ll)p.second * y[p... | ALGO | 0.999868 | 3.933711 |
c75b8097-841d-4782-bd63-6ee4bc6e8c3c | hareta0109/atcoder | submissions/abc/abc164/d.cpp | #include <bits/stdc++.h>
using namespace std;
#define MOD (long long int)(1e9+7)
#define ll long long int
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define reps(i,n) for(int i=1; i<=(int)(n); i++)
#define REP(i,n) for(int i=n-1; i>=0; i--)
#define REPS(i,n) for(int i=n; i>0; i--)
#define FOR(i,a,b) for(int i=a; i<... | ALGO | 0.999909 | 5.235505 |
99548fc8-d866-4e0f-ad2b-e60173294f93 | sarvex/leetcode-wren | solution/1700-1799/1793.Maximum Score of a Good Subarray/Solution.cpp | class Solution {
public:
int maximumScore(vector<int>& nums, int k) {
int n = nums.size();
vector<int> left(n, -1);
vector<int> right(n, n);
stack<int> stk;
for (int i = 0; i < n; ++i) {
int v = nums[i];
while (!stk.empty() && nums[stk.top()] >= v) {
... | ALGO | 0.999983 | 5.715046 |
9f833d25-0681-4784-af3c-d6e336a5eea3 | mariaaktermukti/vjudge | Numbers_on_whiteboard.cpp | #include <iostream>
#include <vector>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t;
cin >> t;
while (t--) {
int n;
cin >> n;
cout << 2 << '\n';
int a = n, b = n - 1;
for (int i = 0; i < n - 1; ++i) {
c... | ALGO | 0.999692 | 4.68076 |
3c6f07fb-18a0-4506-9ed1-4df09303d33f | ishandutta2007/codeforces | s2speed/normal/1582/C.cpp | #include<bits/stdc++.h>
using namespace std;
#pragma GCC optimize ("Ofast")
#define all(x) x.begin() , x.end()
#define sze(x) (ll)(x.size())
#define mp(x , y) make_pair(x , y)
#define wall cerr<<"--------------------------------------"<<endl
typedef long long int ll;
typedef pair<ll , ll> pll;
typedef pair<int , int... | ALGO | 0.999661 | 4.614582 |
83cba66a-fed6-4f43-82aa-380b1c950c79 | fjahr/signet2 | src/key_io.cpp | #include <key_io.h>
#include <base58.h>
#include <bech32.h>
#include <script/script.h>
#include <util/strencodings.h>
#include <boost/variant/apply_visitor.hpp>
#include <boost/variant/static_visitor.hpp>
#include <assert.h>
#include <string.h>
#include <algorithm>
namespace
{
class DestinationEncoder : public boos... | TOOL | 0.889345 | 7.690852 |
284ab1fc-0c3e-45b5-895f-11f1074030cd | falcaoanderson/CompetitiveProgramming | juizes/vjudge-s3-b.cpp | // 13/06/23 //
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <tuple>
#include <cstring>
#include <stack>
using namespace std;
#define ll long long
#define endl "\n"
#define fast_io ios_base::sync_wit... | ALGO | 0.999313 | 4.37769 |
c2b42c67-12ce-4a15-814f-843cb01392a2 | satyam-seth-learnings/c_plus_plus_learning | GeekyShows/P-OPPs/121.Array_Of_Pointer.cpp | #include<iostream>
using namespace std;
int main()
{
int a[]={10,30,50,70};
int *p[3];
int i;
cout<<"Output via Pointer:"<<endl;
cout<<"Address\t Value";
for(i=0;i<4;i++)
{
p[i]=&a[i];
cout<<"\n"<<p[i];
cout<<" "<<*p[i];
}
return 0;
} | TOOL | 0.983472 | 3.421096 |
c387a6ae-29a9-4755-aacc-c5ab7dbed279 | SelimOzel/filtfilt | cpp/eigen3/bench/benchCholesky.cpp |
// g++ -DNDEBUG -O3 -I.. benchLLT.cpp -o benchLLT && ./benchLLT
// options:
// -DBENCH_GSL -lgsl /usr/lib/libcblas.so.3
// -DEIGEN_DONT_VECTORIZE
// -msse2
// -DREPEAT=100
// -DTRIES=10
// -DSCALAR=double
#include <iostream>
#include <Eigen/Core>
#include <Eigen/Cholesky>
#include <bench/BenchUtil.h>
using na... | TEST | 0.996323 | 5.938015 |
6f4da22c-7778-4261-9725-717787d3ec96 | J-DRD/--BIQU-B1-----SKR-1.4---Marlin-2- | buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/variant.cpp | #include "pins_arduino.h"
#ifdef __cplusplus
extern "C" {
#endif
// Digital PinName array
const PinName digitalPin[] = {
PA_0, // Digital pin 0
PA_1, // Digital pin 1
PA_2, // Digital pin 2
PA_3, // Digital pin 3
PA_4, // Digital pin 4
PA_5, // Digital pin 5
PA_6, // Digital pin 6
PA_7, // Dig... | CONFIG | 0.917435 | 6.185098 |
fefaaad8-63ac-4c8e-87a7-c55990399d82 | apletea/MMF_Labs | C++ 1 course/6.a.cpp | #include <iostream>
#include <clocale>
#include <iomanip>
using namespace std;
const int maxsize = 100;
bool push(int b[], int &c, int elem)
{
int k;
cout<<"Введи число для добовления"<<endl;
cin>>k;
b[c++] = k;
if (c >= maxsize) return 0;
else
return 1;
}
int pop(int b[], int &c) // э... | ALGO | 0.861751 | 3.639321 |
f0fba276-2791-4524-b6ea-cfa90d985d2a | pri1712/codefoces | 1875C.cpp | #include <bits/stdc++.h>
#include <algorithm>
#include <vector>
#include <cmath>
#include <map>
#define ci(n) cin>>n
#define co(n) cout<<n
#define nl '\n'
#define LLMAX LLONG_MAX
#define r0 return 0
#define rall(x) (x).rbegin(), (x).rend()
#define all(x) (x).begin(), (x).end()
#define printstr(s) for(int i=0;i<(int)s.s... | ALGO | 0.999019 | 4.253945 |
0e0e4fe4-b095-4ef8-863e-6071d5540458 | someshjoyguru/dsa-cp | contests/all_submissions/2037B.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);cerr.rdbuf(cout.rdbuf());
#define f(i,a,b) for (ll (i)=(a); (i)<(b); (i)++)
#define rf(i,a,b) for (ll (i)=(a); (i)>=(b); (i)--)
#define vll vector<ll>
#define vvll vector<vll>
#define in(n... | ALGO | 0.999962 | 3.308342 |
323d29cb-9546-4aa3-b32c-33980e2feaea | Oaik/problems-solution | codeforces/contest/1041/a/56017878.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define clr(a,b) memset(a,b,sizeof(a))
#define all(v) ((v).begin()),((v).end())
void debug() {
#ifndef ONLINE_JUDGE
freopen("input.in", "rt", stdin);
// freopen("output.txt", "wt", stdout);
#endif
cout << fixed << setprecision(0);
ios::sync_with_... | ALGO | 0.999708 | 4.022027 |
8e5ef732-36dd-48c2-9627-cfaa36e7863b | beelisais2793/FX | Synthesizer/Stk/pieces/BandedWG.cpp | /***************************************************/
/*! \class BandedWG
\brief Banded waveguide modeling class.
This class uses banded waveguide techniques to
model a variety of sounds, including bowed
bars, glasses, and bowls. For more
information, see Essl, G. and Cook, P. "Banded
Waveguid... | TOOL | 0.856087 | 5.962828 |
35793eca-53a9-4fff-a365-626cb8d17a66 | kdm1258/Beakjoon.c | stack.cpp | #include <bits/stdc++.h>
using namespace std;
int main(void){
stack<int> stk;
int n;
cin>>n;
for (int i = 0 ; i < n ; i++){
string str;
int tmp = 0;
cin>>str;
if(!str.compare("push")){
cin>>tmp;
stk.push(tmp);
}
else if(!str.compare("pop")){
if(stk.empty()) cout<<-1;
else{
cout<<... | ALGO | 0.999147 | 4.27302 |
0cb5633d-eaff-4332-9695-7afec1ea5565 | mwashief/step | Codeforces/1251-1500/1311/1311E.cpp | /*
Washief Hossain Mugdho
26 April 2021
Codeforces 1311 1311E
*/
#ifndef DEBUG
#pragma GCC optimize("Ofast")
#pragma GCC optimization("unroll-loops, no-stack-protector")
#pragma GCC target("avx,avx2,fma")
#endif
#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define fr first
#define sc... | ALGO | 0.999787 | 4.461073 |
3b579286-b7b9-496f-8d6f-c23d89dc64ff | varun-asuri/Computer-Vision | Lab04/l042.cpp | #include <iostream>
#include <fstream>
#include <cstdlib>
#include <string>
#include <vector>
#include <math.h>
#include <ctime>
#include <list>
#include <map>
using namespace std;
/************************
* You can set the number of clusters and points down below.
* This lab supports up to 20 different clusters ... | ALGO | 0.994755 | 3.885747 |
5a5aac88-446f-4abe-8d5c-e39abb149f25 | aamya2004/DSA | Maths/missingNumber.cpp | int missingNumber(vector<int>& nums) {
int ans;
int n = nums.size();
int totalSum = n*(n+1)/2; //sum of n numbers
int sum = 0;
for(int i = 0; i<nums.size(); i++){
sum+=nums[i];
}
ans = totalSum - sum;
return ans;
} | ALGO | 0.999716 | 5.632876 |
a8652d20-e300-4a20-bf65-5b9948012b23 | PacificCommunity/seapodym-codebase | src/predicted_catch.cpp | #include "calpop.h"
///Forward function for:
///predicting catch by fishery based on fishing effort.
const double sq_degree = 12347.65; // sq.km in sq.degree (without lat_correction)
void CCalpop::predicted_catch_fishery_comp(const PMap& map, CParam& param, VarMatrices& mat, /* dmatrix total_mort, */const int f, ... | ALGO | 0.99936 | 4.665848 |
cfe7678f-efe2-4104-b304-349ea8fbb6bb | PTALTS-LK/usc-droid | app/src/main/cpp/Main/src/SongSort.cpp | #include "stdafx.h"
#include "SongSort.hpp"
#include "Shared/Profiling.hpp"
const SongSelectIndex& getSongFromCollection(uint32 index, const Map<int32,
SongSelectIndex>& collection)
{
auto it = collection.find(index);
if (it == collection.end())
{
Logf("Could not find song id %u", Logger::Severity::Error, index)... | ALGO | 0.995231 | 6.147767 |
153a5fed-06e0-41c7-9823-6ba120842d9e | kabraneel/Competitive-Programming | ICPC/ICPC2022Kanpur/A.cpp | // na ho paega humse
// nai_aati_coding
// i love PD
// Motivation when feeling low : http://bitly.com/98K8eH
#include <bits/stdc++.h>
#include <chrono>
using namespace std;
#define int long long
#ifdef KABRANEEL
#define LOCAL
#include "/home/kabraneel/coding/debug.h"
#else
#define debug(x...)
#define debugln(x...)
#e... | ALGO | 0.999893 | 4.339478 |
b363ed01-1cde-4b40-9a57-6ad24b67b4e4 | ishandutta2007/codeforces | tinkerking/normal/1558/C.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int,int> pii;
int n;
int a[20111];
vector<int> ans;
void flip(int p) {
reverse(a + 1, a + p + 1);
ans.push_back(p);
}
int main() {
int T;
scanf("%d",&T);
while(T--) {
scanf("%d",&n);
bool OK = true;... | ALGO | 0.999409 | 3.674744 |
bdc9d4b6-31b5-43d6-80ae-9749fb47a952 | RuairiOKeefe/Honours-Project | Honours Project/include/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp | #include "btConvexPlaneCollisionAlgorithm.h"
#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
#include "BulletCollision/CollisionShapes/btConvexShape.h"
#include "BulletCollision/CollisionShapes/btStaticPlaneShape.h"
#include "BulletC... | ALGO | 0.99908 | 7.401257 |
0223cdc4-158a-405d-843c-cac3005dfb00 | MOAIS-O-22-1/II-semester | programming_technology/Торгайкин/Лабораторная работа 0/1.cpp | #include <iostream>
#include <vector>
using namespace std;
pair<size_t, size_t> max_element(const vector<vector<int>>& matrix)
{
pair<size_t, size_t> max(0, 0);
for (size_t i = 0; i < matrix.size(); i++)
{
for (size_t j = 0; j < matrix[0].size(); j++)
{
if (matrix[i][j] > matrix[max.first][max.second])
... | ALGO | 0.999964 | 4.434691 |
ed064640-e8d2-463a-a8f4-f1f5b0ec6ce7 | DrawFun/OctaneBlender | blender/extern/bullet2/src/BulletDynamics/MLCPSolvers/btLemkeAlgorithm.cpp | #include "btLemkeAlgorithm.h"
#undef BT_DEBUG_OSTREAM
#ifdef BT_DEBUG_OSTREAM
using namespace std;
#endif //BT_DEBUG_OSTREAM
btScalar btMachEps()
{
static bool calculated=false;
static btScalar machEps = btScalar(1.);
if (!calculated)
{
do {
machEps /= btScalar(2.0);
// If next epsilon yields 1, then brea... | ALGO | 0.999995 | 3.480065 |
ae210032-9887-4a43-92ed-baadd512319e | mohammad-majoony/UVa | 336 - A Node Too Far/main.cpp | // When i wrote this code, only me and God knew how it works. Now only God knows...
// https://vjudge.net/problem/UVA-336
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define MAJOONI ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define ONLINE_JUDGE
#d... | ALGO | 0.994318 | 4.22275 |
9563645e-f905-4706-b9d1-d99fdddb0fbf | wang-edward/teensy-juno | lib/Audio/effect_combine.cpp | // Combine analog signals with bitwise expressions like XOR.
// Combining two simple oscillators results in interesting new waveforms,
// Combining white noise or dynamic incoming audio results in aggressive digital distortion.
#include <Arduino.h>
#include "effect_combine.h"
void AudioEffectDigitalCombine::upda... | TOOL | 0.88296 | 5.251869 |
463f1295-e11b-49bc-848d-e6c0914ace12 | PPUDANI/ProgrammersCode | 프로그래머스/0/120809. 배열 두배 만들기/배열 두배 만들기.cpp | #include <string>
#include <vector>
using namespace std;
vector<int> solution(vector<int> numbers) {
for(int& Element : numbers)
{
Element *= 2;
}
return numbers;
} | ALGO | 0.999468 | 5.323621 |
36d326bb-4d2d-41f4-aabf-22ce29d81d25 | parth506/leetcode | dp_leetcode/House_Robber_2.cpp | class Solution
{
public:
int robber(vector<int> &a)
{
int n = a.size();
int prev = a[0];
int prev2 = 0;
for (int i = 1; i < n; ++i)
{
int take = a[i];
if (i > 1)
take += prev2;
int non_take = 0 + prev;
int cu... | ALGO | 0.999822 | 4.917873 |
cebcc6ec-a0b4-43cd-9319-db6ce74ffab0 | xairry/PAT-Basic | 1003/S1003_0.cpp | #include <iostream>
#include <string>
using namespace std;
bool is_pass(string);
int main() {
int input_number;
string input;
cin>>input_number;
for (int i=0; i<input_number; i++) {
cin>>input;
if (is_pass(input)) {
cout<<"YES"<<endl;
} else {
cout<<"... | ALGO | 0.999547 | 4.64116 |
e11c0c03-09d1-41ad-bd99-66096397375d | Ari122003/Leetcode-GFG | Arrays/Max_score.cpp | #include <iostream>
#include <vector>
#include <climits>
using namespace std;
int maxScore(vector<int> &cardPoints, int k)
{
int leftsum = 0, rightsum = 0;
int n = cardPoints.size();
int ans;
for (int i = 0; i < k; i++)
{
leftsum += cardPoints[i];
ans = leftsum;
}
int r =... | ALGO | 0.999677 | 4.845709 |
90bf499c-810d-4a32-b81c-85fde2f93013 | Izabela-Krygier/CppProjects | czasy/main.cpp | #include <iostream>
#include <time.h>
#include <cstdlib>
using namespace std;
int main()
{
int ile;
clock_t start, stop;
double czas;
cout << "Ile liczb w tablicy: ";
cin >> ile;
int *tablica;
tablica = new int [ile];
start=clock();
for(int i=0; i<ile; i++)
{
tablica... | ALGO | 0.953862 | 3.344643 |
4556ef09-531e-4f8b-b23f-e4f25c8a9204 | kimhamgu/CoinStudy | 김한결/[1주차]해시_완주하지못한선수.cpp | #include <string>
#include <vector>
#include <algorithm>
using namespace std;
string solution(vector<string> participant, vector<string> completion)
{
sort(participant.begin(), participant.end());
sort(completion.begin(), completion.end());
for (int i = 0; i < completion.size(); i++)
{
i... | ALGO | 0.999328 | 5.498098 |
26994821-2917-4f37-84ce-8bca00386b1d | chandru007raju/CodingNinjas | Introduction-To-C++/L-10_Strings_/Exercises/countWords.cpp | #include<iostream>
#include<cstring>
using namespace std;
int countWords(char str[]){
int count = 1;
for(int i=0;str[i] != '\0';i++){
if(str[i] == ' '){
count++;
}
}
return count;
}
int main(){
int s =1e6;
char str[s];
cin.getline(str,s);
cout<<countWords(s... | ALGO | 0.998161 | 3.52294 |
f3983d19-0603-4494-89ee-6edfc8b04520 | CoinBlack/blackcoin-more | src/wallet/staking.cpp | #include <index/txindex.h>
#include <wallet/coincontrol.h>
#include <wallet/receive.h>
#include <wallet/staking.h>
#include <node/miner.h>
namespace wallet {
static int64_t GetStakeCombineThreshold() { return 500 * COIN; }
static int64_t GetStakeSplitThreshold() { return 2 * GetStakeCombineThreshold(); }
void StakeC... | TOOL | 0.995197 | 4.245544 |
6bf55b7c-d8b7-411a-9b6f-d1e2bfadbf05 | ibnushevayanto/learn-cpp | praktik-struktur-data/Pertemuan 13 - Queue/lat13_1.cpp | #include <iostream>
#include <conio.h>
using namespace std;
struct node
{
char isi;
struct node *next;
};
void Sisip_Belakang(struct node **simpul, char elemen);
void Hapus_Depan(struct node **simpul);
void Cetak(struct node *simpul);
main()
{
char huruf;
struct node *L = NULL;
int i;
cout <... | ALGO | 0.998829 | 4.352941 |
43c1dda1-2d0c-45b0-b59d-11f9419fcc4d | Xushi8/Code | 2024/May/CF1703/e.cpp | // 2024/05/17 21:44:19
#include <iostream>
#include <algorithm>
#include <cstring>
#include <cstdint>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <functional>
#include <iomanip>
#include <cmath>
#include <stack>
#include <... | ALGO | 0.999889 | 5.729103 |
dbe08804-e1a8-4c79-8513-0a0735fc8f2c | Pralay19/Cpp_coding | RectangleCutting.cpp | #include<bits/stdc++.h>
using namespace std;
int cutting(int a,int b){
vector<vector<int>>dp(a+1,vector<int>(b+1,1e6));
// dp[i][j]=min number of cuts to break a block
// of i*j into squares
for(int i=1;i<=a;i++){
for(int j=1;j<=b;j++){
//i->height
//j->width
if(i==j){
dp[i][i]=0;
continue;
... | ALGO | 0.999559 | 4.16432 |
592a1d8e-59fb-43ef-a11f-eb002143057b | ChinnamLakshmiDurga/CPP-World | Sorting Algorithms/DNF sort.cpp | #include<iostream>
using namespace std;
void swap(int arr[],int i,int j){
int temp=arr[i];
arr[i]=arr[j];
arr[j]=temp;
}
void dnfsort(int arr[],int n){
int low=0;int mid=0;int high=n-1;
while(mid<=high){
if(arr[mid]==1)
{
mid++;
}
else if(arr[mid]==0){
... | ALGO | 0.999975 | 4.32383 |
014db197-e1b9-4ffe-9bec-19deb195ec3a | BlessingSea/leetcode | array/1_2.cpp | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main() {
// 1. initialize
vector<int> v1(5, 0);
// 2. make a copy
vector<int> v2(v1.begin(), v1.end());
vector<int> v3(v2);
// 2. cast an array to a vector
// 3. get length
cout << "The size of v1 is: " ... | TOOL | 0.857706 | 3.586293 |
a48872b7-6a36-4a10-be55-98a7a81d8815 | ht1602/EMOC-with-preference | src/algorithm/algorithm_head_collect.cpp | #include "algorithm/algorithm_head_collect.h"
#include "core/macro.h"
#include "algorithm/algorithm_factory.h"
namespace emoc {
// Docomposition Based Algorithms
EMOC_REGIST_ALGORITHM(Multiobjective, Docomposition Based, MOEADDYTS);
EMOC_REGIST_ALGORITHM(Multiobjective, Docomposition Based, MOEAD);
EMOC_REGIST_A... | CONFIG | 0.998903 | 4.641213 |
d315bdef-e4de-4a8c-8dc0-f81a36fbc4b8 | amangupta017/DSA_CPP_code_paractice | 2D_Array/Row_Wise_Sum.cpp | #include <iostream>
using namespace std;
void printSum(int arr[][3],int row,int col){
for(int row=0;row<3;row++){
int sum=0;
for(int col=0;col<3;col++){
sum+=arr[row][col];
}
cout<<sum<<" ";
}
cout<<endl;
}
int main(){
int arr[3][3];
for(int row=... | ALGO | 0.999679 | 3.86783 |
432b1378-a5b9-4eb0-88fd-1dc2929921e6 | followingthefasciaplane/source-engine-diff-check | misc/game/shared/sheetsimulator.cpp | #include "sheetsimulator.h"
#include "edict.h"
#include "collisionutils.h"
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
#define COLLISION_PLANE_OFFSET 6.0f
//-----------------------------------------------------------------------------
// constructor, destructor
//-----... | ALGO | 0.922125 | 4.58141 |
77774d28-9378-4622-a642-ed771b807320 | Anushree685/Array-Assignment2 | uniqueValue.cpp | #include<iostream>
using namespace std;
int main(){
int arr[7] = {2,2,3,3,4,4,1};
for(int i=0;i<7;i++){
int count = 0 ;
for(int j=0;j<7;j++){
if(j!=i && (arr[i] == arr[j])) count++;
}
if(count == 0) {
cout<<arr[i]<<" is the odd one .";
break;
... | ALGO | 0.999815 | 3.875617 |
0f692b24-a964-4bb4-a9d4-3372489b41ab | ChandlerWang14/Gem5-archlab | src/systemc/tests/systemc/misc/synth/combo/switch3/switch3.cpp | /*****************************************************************************
switch3.cpp --
Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15
*****************************************************************************/
/****************************************************************************... | TOOL | 0.948328 | 4.535574 |
7a4f3f38-8701-4cf5-8cca-4d5b95db06cc | VavleenKaur/Leetcode-Questions | 516-longest-palindromic-subsequence/516-longest-palindromic-subsequence.cpp | class Solution {
public:
int longestPalindromeSubseq(string s) {
string t=s;
reverse(s.begin(),s.end());
int n=s.size();
vector<int>prev(n+1,0);
vector<int>cur(n+1,0);
for(int i=1;i<=n;i++)
{
for(int j=1;j<=n;j++)
{ if(s[i-1]==t[j-1... | ALGO | 0.999968 | 6.151997 |
4a1c5e12-5f1e-4587-acd1-be3a8cdcc343 | zenmh/dsa-with-sk-maam-using-cpp | chapter_3_conditional_statements_loops/sum_of_1_to_n_numbers_whice_divisible_by_3.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n, sum = 0;
cin >> n;
for (int i = 0; i <= n; i++)
{
if (i % 3 == 0)
{
sum += i;
}
}
cout << sum;
return 0;
} | ALGO | 0.999819 | 3.877293 |
013a3746-bfff-4861-853e-3083335368eb | lkv01/cpp_practice_lkv01 | cp_questions_codeforces_codechef/B_Complete_the_Word.cpp | // /*
// L K K V V
// L K K V V
// L K K V V
// L KK V V
// L K K V V
// L K K V V
// ... | ALGO | 0.999218 | 3.961327 |
dc4de6ff-2ab9-473e-aa02-1690ce4c3f3a | n01e0/IDULLVM | llvm/tools/llvm-mt/llvm-mt.cpp | #include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/Option.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FileOutputBuffer.h"
#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#inclu... | TOOL | 0.858928 | 7.587856 |
8855bb22-c482-4b7a-843e-0657eecf5818 | PhQuangMinh/PTIT | Kì 4/Code PTIT DSA/DSA09027 - KIỂM TRA ĐƯỜNG ĐI.cpp | #include <bits/stdc++.h>
using namespace std;
int n, m, v;
vector<int> vt[1001];
bool visited[1001];
string ans;
void dfs(int u)
{
visited[u] = true;
if (u == v)
ans = "YES";
if (ans == "YES")
return;
for (auto v : vt[u])
{
if (!visited[v])
{
dfs(v);
... | ALGO | 0.999949 | 4.801881 |
4185001e-cdef-48f0-8de4-05e730a0acaa | stoneatom/stonedb | storage/tianmu/executor/filter_block.cpp | #include "common/assert.h"
#include "executor/filter.h"
#include "util/bin_tools.h"
#include "util/tools.h"
namespace Tianmu {
namespace core {
Filter::Block::Block(Filter *owner, int _no_obj, bool all_full) {
MEASURE_FET("Filter::Block::Block()");
DEBUG_ASSERT(_no_obj > 0 && _no_obj <= (1 << owner->GetPower()));... | TOOL | 0.929762 | 5.729937 |
ce3945b6-d0b9-4c15-a28e-f5be9fb71e2e | MRTHAKER/new_device_zuk | gps/utils/loc_misc_utils.cpp | #include <stdio.h>
#include <string.h>
#include <platform_lib_log_util.h>
#include <loc_misc_utils.h>
#include <ctype.h>
#define LOG_NDDEBUG 0
#define LOG_TAG "LocSvc_misc_utils"
int loc_util_split_string(char *raw_string, char **split_strings_ptr,
int max_num_substrings, char delimiter)
{
... | TOOL | 0.968844 | 5.36803 |
93b55e22-34af-4e40-8b1f-54d2eed684ba | hezhaojiang/leetcode-cpp | 35.搜索插入位置.cpp | /*
* @lc app=leetcode.cn id=35 lang=cpp
*
* [35] 搜索插入位置
*/
#include<vector>
using namespace std;
// @lc code=start
class Solution {
public:
int searchInsert(vector<int>& nums, int target) {
int left = 0;
int right = nums.size() - 1;
while (left <= right) {
int mid = left + (r... | ALGO | 0.999973 | 6.617135 |
c569633f-990b-4aa8-80d0-8a642abec9a1 | SonHoang1002/flutter_structure_project | windows/runner/utils.cpp | #include "utils.h"
#include <flutter_windows.h>
#include <io.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
void CreateAndAttachConsole() {
if (::AllocConsole()) {
FILE *unused;
if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
_dup2(_fileno(stdout), 1);
}
if (freopen_s(&unuse... | TOOL | 0.9988 | 6.76073 |
7296665a-76c4-4816-80b5-3a5204aa89fc | mikejsavage/cocainediesel | libs/msdfgen/core/msdfgen.cpp |
#include "../msdfgen.h"
#include <vector>
#include "edge-selectors.h"
#include "contour-combiners.h"
#include "ShapeDistanceFinder.h"
namespace msdfgen {
template <typename DistanceType>
class DistancePixelConversion;
template <>
class DistancePixelConversion<double> {
DistanceMapping mapping;
public:
type... | ALGO | 0.981609 | 7.414922 |
60a5c237-f068-44b5-a073-e3d539b41d8b | minstaar/beakjoon | 2024/1715.cpp | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
int main()
{
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
priority_queue<int, vector<int>, greater<>> pq;
int N; cin >> N;
int res = 0;
for(int i=0; i<N; i++){
int a; cin >> a;
pq.push(a);
}
wh... | ALGO | 0.999965 | 4.691394 |
f0e48e86-c68b-4d7e-b761-a83087061dfe | ahmedelq/CFS | A/CF791-D2-A.cpp | #include <bits/stdc++.h>
#include <cmath>
using namespace std;
int main() {
float a, b;
cin >> a >> b;
cout << floor(log(b/a)/(log(1.5))) + 1;
return 0;
}
| ALGO | 0.999166 | 3.776802 |
b0c97237-1ebf-4faa-a981-34431bf49795 | demvy/codewars | cpp/narcissisic.cpp | /*
A Narcissistic Number is a number which is the sum of its own digits, each raised to the power of the number of digits in a given base. In this Kata, we will restrict ourselves to decimal (base 10).
For example, take 153 (3 digits):
1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153
and 1634 (4 digits):
1^4 + 6^4 + 3^4... | ALGO | 0.969402 | 6.230671 |
7b276c9c-889a-4b99-89fd-b567dea67617 | Ashish-Chokhani/Competitive_Programming | Codeforces/942/2.cpp | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
typedef long long int ll;
const ll mod = 1000000007; //998244353
const ll INF = 1e18;
#ifndef ONLINE_JUDGE
#define debug(x) cerr << #x << " "; print(x); cerr << '\n';
#else
#define debug(x)
#endif
// #include <ext/pb_ds/assoc_container.hpp>
// using name... | ALGO | 0.999554 | 4.71668 |
616b9a48-616d-4d3f-b5c0-65a45b8b899b | warleon/practica-ordenamiento | radixSortImprove.cpp | #include"auxiliar.h"
#include<time.h>
void radixSortImproved(int input[], int n, int maxLength,int radix) {
int result[n];
int buckets[radix];
for(int i = 0; i< maxLength; i++) {
fillArray(buckets,radix,0);
//counting simbols
for(int j = 0; j<n; j++)
buckets[myHash(inpu... | ALGO | 0.999986 | 3.829484 |
33a25bc5-9ccb-4527-8e55-61fd6e44e186 | zhengxiaoyao0716/ARPGPal-In-Funcode- | SourceCode/VCProjectVC6/VCProjectVC6/Ai.cpp | #include "CommonAPI.h"
#include <Mmsystem.h>
#pragma comment ( lib, "Winmm.lib" )
///******************************ܺ***************************************/
//루δ㹴ɣ
float getDistance(const char *startName, const char *endName);
///*************************************************************************/
#define... | TOOL | 0.952434 | 3.352816 |
50994eea-3b02-4d7f-b5d3-11314f242256 | ucas-joy/my_leetcode | 3Longest Substring Without Repeating Characters.cpp | /*Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the length of 3. Note that the answer must be a substring... | ALGO | 0.999917 | 4.939481 |
82e9242e-52c1-479a-934e-83a3d2e651b2 | cgutierrez-palace/testprotectionrule | src/SumatraStartup.cpp | #include "utils/BaseUtil.h"
#include "utils/ScopedWin.h"
#include "utils/WinDynCalls.h"
#include "utils/CmdLineArgsIter.h"
#include "utils/DbgHelpDyn.h"
#include "utils/Dpi.h"
#include "utils/FileUtil.h"
#include "utils/FileWatcher.h"
#include "utils/HtmlParserLookup.h"
#include "utils/GdiPlusUtil.h"
#include "mui/Mui.... | TOOL | 0.957526 | 4.609355 |
5c378d17-f6e8-42f0-b2c9-ebc23358fe82 | Indistanced/esp32-wroom-32-adxl345-spi | components/components/openthread/openthread/src/core/common/binary_search.cpp | /**
* @file
* This file implements a generic binary search.
*/
#include "binary_search.hpp"
#include "common/code_utils.hpp"
namespace ot {
const void *BinarySearch::Find(const void *aKey,
const void *aTable,
uint16_t aLength,
... | ALGO | 0.99947 | 6.707412 |
3448cf4b-284a-4437-a280-76ca2962cfb9 | seclab-fudan/SyzDirect | source/llvm-project-new/llvm/lib/Support/CachePruning.cpp | #include "llvm/Support/CachePruning.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/raw_ostream.h"
#define DEBUG_TYPE "cache-pruning"
#include <s... | TOOL | 0.935406 | 7.901151 |
b1853207-d55c-43af-a40b-67b44a2c095f | RishabhSpark/dsa-problems | leetcode/Algorithms/1160. Find Words That Can Be Formed by Characters.cpp | class Solution {
public:
int countCharacters(vector<string>& words, string chars) {
int count = 0;
vector<int> arr1(26,0);
for(int i=0; i<chars.size(); i++){
arr1[chars[i]-97]++;
}
for(int i=0; i<words.size(); i++){
vector<int> arr2(26, 0);
... | ALGO | 0.999923 | 5.934675 |
099d8b24-7f93-4c7e-b22c-18016f33bc8a | ishandutta2007/codeforces | sana/normal/1718/A2.cpp | #include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstrin... | ALGO | 0.999972 | 4.774552 |
7c63e0c4-efa8-4f0e-9436-e7651595e99d | Marcux777/Programacao_Competitiva | CodeForces/Codeforces Round 870 (Div. 2)/C.cpp | /*
~~ Alguma parte/frase foda de um livro/mangá para dar sorte ~~
Uma vez eu gritei, gradualmente, perdi minha voz.
Uma vez eu chorei, gradualmente, perdi minhas lágrimas.
Uma vez eu sofri, gradualmente, me tornei capaz de suportar tudo.
Uma vez me alegrei, gradualmente, me tornei indiferente ao mundo.
E agora, tudo o... | ALGO | 0.999934 | 5.567339 |
ca6bfd73-7fe1-4b3c-bb89-c4d85e2eed5e | alvinsunyixiao/IlliniRM | dafu-pipeline/cpp-mac/grid-detect.cpp | #include "num_recog.h"
#include "grid-detect.h"
//#include <boost/python.hpp>
/*
TODO:
- Finish Main
- NN for white digits
- comm communication
- CV-recog and NN for red digits
- test demo
*/
int counter = 0;
Scalar lower_red_1(0, 4, 210);
Scalar upper_red_1(25, 255, 255);
Scalar... | ALGO | 0.955907 | 4.331102 |
aa897164-1bf1-4b78-8446-04679c0f10fd | aryan29/Competetive-Programming-codes | codeforces/Book Reading.cpp | // Author: ishaang12
// Time: 2019-08-30 20:31:56
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define deb(x) cout << '>' << #x << ':' << x << '\n';
int main()
{
ios::sync_with_stdio(false);
cin.tie(NULL);
ll q;
cin >> q;
ll a[1000][1000];
ll sum[1000];
for (ll i = 1; i <= 10; ++i)
{
... | ALGO | 0.999565 | 4.415845 |
eebf4cca-2728-489f-9ea3-3660726207d4 | naxocist/naxocist-cp | TOI-zero/A1-023.cpp | #include <bits/stdc++.h>
using namespace std;
#define ln '\n'
#define ll long long
#define all(x) begin(x), end(x)
#define pb emplace_back
int32_t main() {
cin.tie(nullptr)->sync_with_stdio(0);
int t; char c; cin >> t >> c; c = tolower(c);
if(c == 'c') {
if(t <= 0) cout << "solid";
else if(t < 100) cou... | ALGO | 0.980905 | 4.338754 |
1605b54c-8fe2-43bd-9a08-7c8db085d843 | ishandutta2007/codeforces | danya090699/normal/1257/B.cpp | #include <bits/stdc++.h>
using namespace std;
main()
{
//freopen("input.txt", "r", stdin);
int t;
cin>>t;
while(t)
{
t--;
int x, y;
cin>>x>>y;
if(x>3) x=2e9;
else if(x>1) x=3;
if(x>=y) cout<<"YES\n";
else cout<<"NO\n";
}
} | ALGO | 0.999769 | 3.961716 |
ec491cc9-ee58-44b2-8ee0-ffc11da3ab78 | H-Shen/MyCodeCollection | Leetcode/463/463.cpp | class Solution {
public:
int islandPerimeter(vector<vector<int>>& grid) {
constexpr int dx[] = {1, -1, 0, 0};
constexpr int dy[] = {0, 0, -1, 1};
constexpr int STEPS = 4;
int counter = 0;
int n = (int)grid.size();
int m = (int)grid.front().size();
int new_i, n... | ALGO | 0.999874 | 6.260934 |
f3262fab-b88a-4f84-bfd3-a7a84f68093d | forrudnprogramming/foreveryone | vtoroedz/5tema/Number9.cpp | #include <iostream>
using namespace std;
int main() {
int month,year;
cin >> month;
year = month / 12;
month = month % year;
cout << year << " year(s), " << month << " month(s) ";
return 0;
}
| TOOL | 0.99163 | 4.356717 |
3d930e49-48ed-4fb1-a261-3c384d7c9c81 | Uzair153/PF_lab_practice | Program#09.cpp | /*Write a C++ program which displays the average of even numbers and average of odd numbers between a range of numbers.
You need to take inputs of lower and higher values of a range and display the averages of even numbers and odd numbers fall between those values.*/
#include <iostream>
using namespace std;
int main()
... | ALGO | 0.998716 | 5.242223 |
35da60b8-a0d4-4b76-b432-01a3e1d6012b | gabriel-candeia/Competitive-Programming-Solutions | Codeforces/1311F.cpp | #include<bits/stdc++.h>
#define ll long long
#define maxn int(2e5+5)
using namespace std;
ll ft[2][maxn];
int lsone(int x){
return x&(-x);
}
void update(ll k, ll r, ll v){
if(r==0) return;
for(;r<maxn;r+=lsone(r))
ft[k][r]+=v;
}
ll query(ll k, ll r){
ll sum = 0;
for(;r;r-=lsone(r))
... | ALGO | 0.999956 | 3.511601 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.