uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
37fb31b8-36c3-4b07-ac37-02f364e691dc | SJMA11723/Problem-solving | codeforces/Codeforces Round 896 (Div. 2)/B.cpp | /**
* Author: Jorge Raul Tzab Lopez
* Github: https://github.com/SJMA11723
*/
#include <bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int t; cin >> t;
while(t--){
int n, k, a, b;
cin >> n >> k >> a >> b;
pair<int64_t... | ALGO | 0.999882 | 4.348467 |
ebdd5d53-11ca-484a-a498-bfc6de8ad43c | Rachit220504/DAA | Design And Analysis Of Algorithms/Tutorial 04/Program_0.cpp |
#include <bits/stdc++.h>
using namespace std;
class Set
{
private:
vector<int> Elements;
public:
int size()
{
return Elements.size();
}
void addElement(int e)
{
Elements.push_back(e);
}
void clearElements()
{
Elements.clear();
}
int getElemen... | ALGO | 0.999753 | 5.272363 |
eba8d3ee-1d08-426c-b47e-0f6739ab0237 | nirvana369/UVA-problem-solved | 11716.cpp | /*
Hoang Linh
*/
#include <cstdlib>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <map>
#include <iostream>
#define fi "11716.inp"
#define fo "11716.out"
/**/
using namespace std;
/**/
void input()
{
int ntest;
int i,j,d;
int temp,... | ALGO | 0.99724 | 3.812848 |
7b55e463-87d4-432e-8b42-0f9f318996b9 | ekeshfsociety/Codechef-Contests | Codechef Starters 7 July 2021/ODDBITS2.cpp | #include<bits/stdc++.h>
#define ll long long
using namespace std;
ll int decToBinary(ll int n)
{
ll int binaryNum[32];
ll int i = 0;
while (n > 0) {
binaryNum[i] = n % 2;
n = n / 2;
i++;
}
ll int count = 0;
for (ll int j = i - 1; j >= 0; j = j - 2)
{
i... | ALGO | 0.999908 | 4.262592 |
fa49ffee-409a-4754-80ee-ca96172dc286 | FatmaAtta/Image_Processing | RGB.cpp | // Created by fatma on 09/10/2023.
//FCAI - OOP Programming - 2023 - Assignment 1
//Program Name: main.cpp
//Last Modification Date: 10/19/2023
//Purpose: Using a bitmap library to convert an image into an array in order to apply some filters on it
//version 2.0 RGB
//Fatma Mahmoud Atta 20220510
//Shahd Mohammed Ahmed ... | TOOL | 0.896453 | 3.774569 |
3d680ba5-1ee7-4ce5-8db5-8bab59af7897 | yujin-hong/algorithm_study | programmers/hash/42576/main.cpp | #include <string>
#include <vector>
#include <algorithm>
#include <iostream>
using namespace std;
string solution(vector<string> participant, vector<string> completion) {
string answer = "";
sort(participant.begin(), participant.end());
sort(completion.begin(), completion.end());
for(int i=0;i<partici... | ALGO | 0.999518 | 5.195185 |
183190aa-dc24-43f3-b1b5-6fd43f87934f | ishandutta2007/codeforces | nuip/normal/1466/E.cpp | #include <string>
#include <vector>
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<stack>
#include<queue>
#include<cmath>
#include<algorithm>
#include<functional>
#include<list>
#include<deque>
#include<bitset>
#include<set>
#include<map>
#include<unordered_map>
#include<unordered_set>
#include<cstring>... | ALGO | 0.999871 | 3.457567 |
e5224a9d-cf54-40b2-8450-4b1b6190bc4f | katariyanaman/Data-Structures-in-CPP- | Program_to_create_a_balanced_binary_tree_of_the_incoming_data.cpp | /* The following C++ program creates a balanced binary tree from an array
of integers, and then prints the tree in both preorder and inorder traversal. */
#include <iostream>
using namespace std;
typedef struct bin_tree_node
{
int v;
struct bin_tree_node *left;
struct bin_tree_node *righ... | ALGO | 0.999985 | 6.451979 |
2867dec2-4569-4875-8168-0d09cee813f7 | rabiasm/ce100-hw6-rabia-sume | ce100-hw6-rabia-sume/cryptopp850/rc2.cpp | // rc2.cpp - originally written and placed in the public domain by Wei Dai
#include "pch.h"
#include "rc2.h"
#include "misc.h"
#include "argnames.h"
NAMESPACE_BEGIN(CryptoPP)
void RC2::Base::UncheckedSetKey(const byte *key, unsigned int keyLen, const NameValuePairs ¶ms)
{
AssertValidKeyLength(keyLen);
int eff... | ALGO | 0.989186 | 7.735723 |
4d4c0ac6-5edd-43b7-955c-a62ecf5b9c38 | hasnat0006/CP_SOLUTION | YouKnowWhoAcademy/Phase 02/2. Basic Math and Again Number Theory/3. IP_Checking.cpp | //!-----------------------------------------------------!//
//! Author: YUSUF REZA HASNAT !//
//! Created: 16|10|2024 00:38:45 !//
//!-----------------------------------------------------!//
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
#def... | ALGO | 0.998873 | 5.796008 |
d434c5a2-41c1-409d-a877-f1a8e3d51c97 | TalkySafe143/Advance-ShortestPaths | solutions/friend_suggestion.cpp | // Sebastian Galindo
#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef complex<ld> cd;
typedef pair<int, int> pi;
typedef pair<ll,ll> pl;
typedef pair<ld,ld> pd;
typedef vector<int> vi;
typedef vector<ld... | ALGO | 0.99992 | 4.916658 |
1084734d-edaf-406d-8462-e34612ea8d1b | splucs/Competitive-Programming | Maratona de Programação/Subregional 2017/L.cpp | #include <bits/stdc++.h>
using namespace std;
#define MAXN 2600001
/*
struct base {
double x, y;
base() : x(0), y(0) {}
base(double a, double b=0) : x(a), y(b) {}
base operator/=(double k) { x/=k; y/=k; return (*this); }
base operator*(base a) const { return base(x*a.x - y*a.y, x*a.y + y*a.x); }
base operator*=(b... | ALGO | 0.999927 | 3.66263 |
b33f8417-c661-42ad-9886-7f4946618e20 | raghu-yemmanuru/code4fun | questions/careercup/insertionSort.cpp | #include <iostream>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <iterator>
using namespace std;
typedef vector<int> vi;
int random_number() {
return rand()%50;
}
void insertionSort(vi &v) {
int key;
for (int i = 1; i < v.size(); i++) {
key = v[i];
int j = i;
... | ALGO | 0.998546 | 4.281328 |
75422ec3-6e8d-4950-8862-ef048186e252 | ishandutta2007/codeforces | xay5421/normal/1097/D.cpp | // author: xay5421
// created: Wed Dec 9 16:29:45 2020
#ifdef xay5421
#define D(...) fprintf(stderr,__VA_ARGS__)
#else
#define D(...) ((void)0)
//#define NDEBUG
#endif
#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=(a);i<=(b);++i)
#define per(i,a,b) for(int i=(a);i>=(b);--i)
using namespace std;
typedef long lon... | ALGO | 0.999946 | 4.236925 |
913841d8-f021-4e47-9722-dca6781b2eb9 | Volgarenok/spbspu-labs-2025-tp-a | maslevtsov.stanislav/T3/shapes.cpp | #include "shapes.hpp"
#include <algorithm>
#include <iterator>
namespace {
struct DelimiterIn
{
char exp;
};
std::istream& operator>>(std::istream& in, DelimiterIn&& rhs)
{
std::istream::sentry sentry(in);
if (!sentry) {
return in;
}
char c = '0';
in >> c;
if (in && (c != r... | TOOL | 0.851475 | 5.873272 |
23da3fa4-ba7a-4974-8f4e-d090c1793fb2 | firiexp/contest_log | atcoder/Other/ddcc2020-qual-A.cpp | #include <iostream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>
static const int MOD = 1000000007;
using ll = long long;
using namespace std;
template<class T> constexpr T INF = ::numeric_limits<T>::max()... | ALGO | 0.999681 | 3.777511 |
e57256c7-7e0f-4349-89d2-642c8a8c798c | Samrudhi00/LEETCODE-150 | 1823-find-the-winner-of-the-circular-game/1823-find-the-winner-of-the-circular-game.cpp | class Solution {
public:
int findTheWinner(int n, int k) {
int winner = 0;
for (int i = 2; i <= n; ++i) {
winner = (winner + k) % i;
}
return winner + 1;
}
};
// based on the Josephus problem | ALGO | 0.999998 | 6.310382 |
8ac43851-6ff5-40c7-8fef-88f1b1e5bd6d | popgenmethods/SINGER | SINGER/SINGER/Fitch_reconstruction.cpp | //
// Fitch_reconstruction.cpp
// SINGER
//
// Created by Yun Deng on 8/8/22.
//
#include "Fitch_reconstruction.hpp"
Fitch_reconstruction::Fitch_reconstruction(Tree tree) {
base_tree = tree;
fill_tree_info(base_tree);
}
void Fitch_reconstruction::reconstruct(double pos) {
recon_pos = pos;
pruning_... | ALGO | 0.999868 | 3.591935 |
dfc50029-a085-43df-bbac-4ddcee9559fa | BlueSu007/LocalDisk-D | Codes/解题程序/10.1 Training/05 Homework/05:合唱队形.cpp | #include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
using namespace std;
#define LEN 105
int n , a[LEN] , dp[2][LEN] , ans ;
int main() {
scanf ( "%d" , &n ) ;
for ( int i = 1 ; i <= n ; i++ ) {
scanf ( "%d" , &a[i] ) ;
}
// 写注释的时候想复杂了。其实就是对于每个数,暴力枚举一下前面的数,如果小于它就加一,然后实时更新最大值
for ( i... | ALGO | 0.999913 | 3.573312 |
a7787c85-42e0-446c-bc5e-703e93b733d4 | dhirajpatil2346/compitative | a20j/k-string.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
string s;
cin >> n >> s;
map<char, int> m;
set<char> st;
int t=0;
for (int i = 0; i < s.length(); i++)
{
st.insert(s[i]);
if (m.count(s[i]) == 0)
{
m[s[i]] = 1;
t++;
... | ALGO | 0.999951 | 3.596049 |
e418f660-f5c4-40fa-af37-d8fb4a04c201 | thaisonhp/UDTT | Hoc_UDTT/Week 4/Bai1.cpp | #include<bits/stdc++.h>
using namespace std;
struct Hocsinh{
string ten;
string hodem;
string namsinh;
string diachi;
};
//sapxep ten
void merge(Hocsinh x[], int l, int m, int r){
int n1 = m-l+1;
int n2 = r-(m+1)+1;
Hocsinh a[n1], b[n2];
for(int i=0; i<n1; i++){
a[i] = x[i+l];
}
for(int i=0; i<n2; i++){
... | ALGO | 0.996969 | 3.79571 |
b02b4da0-f8b4-4211-b21e-9fdad0e30df5 | StolasIn/leetcode_Submissions | content/perfect-squares/Accepted/2-18-2021, 11_08_42 PM/Solution.cpp | // https://leetcode.com/problems/perfect-squares
class Solution {
public:
bool isPerfectSquare(int x){
int s = sqrt(x);
return s*s == x ? true:false;
}
int backpack(vector<int>& item,vector<bool>& vis,vector<int>& dp,int it,int remain){
if(remain<=3){
return remain;
... | ALGO | 0.999968 | 5.745549 |
ec0f70da-8e29-4b2b-9163-c2746d9e8afc | nillerusr/srcsdk | game/server/h_ai.cpp | #include "cbase.h"
#include "game.h"
#include "vstdlib/random.h"
#include "movevars_shared.h"
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
#define NUM_LATERAL_CHECKS 13 // how many checks are made on each side of a NPC looking for lateral cover
#define NUM_LATERAL_LOS_CH... | ALGO | 0.961603 | 5.986316 |
6bface65-23e6-42b4-9134-5ac91e9e450e | byungwook-min/Algorithm | BOJ/9375 - 패션왕 신해빈.cpp | //
// 9375 - 패션왕 신해빈.cpp
// Cpp
//
// Created by 민병욱 on 2022/07/28.
//
#include <iostream>
#include <unordered_map>
using namespace std;
#define FASTIO ios::sync_with_stdio(0); cin.tie(0);
int TC, n, ans;
int main(){
FASTIO;
cin >> TC;
while(TC--){
cin >> n;
unordered_map<string, int> ... | ALGO | 0.999518 | 4.783673 |
776831af-f48b-4dba-8093-b5873c305f6c | RunningPhoton/ACM | strings/Suffix Automation.cpp |
const int maxnode = maxn * 2;
char s[maxn];
class Suffix_Automation{
public:
int ch[maxnode][max_index];
int par[maxnode], len[maxnode];
int index[maxnode], C[maxnode];
int mi[maxnode], ma[maxnode];
int cur, last;
void node(int v = 0) {
len[++cur] = v;
ma[cur] = 0;
mi[cur] = inf;
memset(ch[cur], 0x00, ... | ALGO | 0.999964 | 4.166723 |
08cef9e7-24c0-45e2-8098-c39cc9cd3b58 | Pandey-SaurabhP/CP | Mocks/mock4/n.cpp | #include <bits/stdc++.h>
using namespace std;
#define read(a, n) for(int128_t i = 0; i < n; ++i) cin >> a[i];
#define print128_t(a, n) for(int128_t i = 0; i < n; ++i) if(i == n - 1){ cout << a[i] << " "; } else { cout << a[i] << ' '; }
typedef long long int int128_t;
typedef long double ld;
const int128_t mod = 1e9... | ALGO | 0.999908 | 4.541761 |
e0d0d15d-aeb6-4fb0-8d6e-29f2bc24711e | Zain-ul-din/Algo-and-Data-Structures-Road-Map | C++ Design Pattern/ProjectFileHandling/main.cpp | #include<iostream>
#include <fstream>
#include <string>
using namespace std;
#define MAXSIZE 24
// Doubly Linked List in c++
#if __cplusplus 201103L
#define Hey
#else
#undef Hey
#endif
// Custom String Class
class String {
public:
String(){
_str = new char[MAXSIZE];
length = MAXSIZE;
... | ALGO | 0.966347 | 4.377153 |
d13b119f-57f3-4caa-b3a3-0aed9a4b8c68 | vanpham1411/thuattoanungdungHUST | TRAINING 1/bitMask.cpp | #include<bits/stdc++.h>
using namespace std;
int m,n;
bitset<32> ip;
void input(){
cin>>m;
int a;
for(int i = 0; i < m; i++){
cin>>a;
ip.set(a);
}
cin>>n;
}
int process(){
int b;
for(int i = 0; i< n; i++ ){
cin>>b;
if(!ip.test(b)) return 0;
}
return 1;
}
int main(){
input();
if(process() == 1... | ALGO | 0.999175 | 3.655525 |
e7b3f98f-f0b8-4649-a9fa-3007f1392c92 | Aadarsh-Negi/LeetCode | 1911-maximum-alternating-subsequence-sum/1911-maximum-alternating-subsequence-sum.cpp | long long dp[100004][2];
class Solution {
public:
long long solve(vector<int> &ar,int i,int f){
if(i>=ar.size()) return 0;
if(dp[i][f]!=-1) return dp[i][f];
long long temp = (f ? ar[i] : -ar[i]) + solve(ar,i+1,f^1);
temp = max(temp,solve(ar,i+1,f));
ret... | ALGO | 0.999984 | 5.112914 |
c308a21f-814f-4ac4-b633-501fda99ebe2 | ishandutta2007/codeforces | yasugongshang/normal/834/A.cpp | #include<iostream>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<set>
#include<ctime>
#include<vector>
#include<cmath>
#include<algorithm>
using namespace std;
inline void write(int a){
if(a>=10)write(a/10);
putchar('0'+a%10);
}
inline void writeln(int a){
write(a); puts("");
}
inline int read()//
{... | ALGO | 0.999959 | 3.143853 |
3329ec23-73de-4dac-b3bd-50285a18f385 | chirayu-sharma-07/my_leetcode_solutions | 1915-number-of-wonderful-substrings/1915-number-of-wonderful-substrings.cpp | class Solution {
public:
long long wonderfulSubstrings(string word) {
unordered_map<long long,long long> mp;
mp[0]=1;
int cum_xor=0;
long long result=0;
for(char &ch:word){
int shift=ch-'a';
cum_xor^=(1<<shift);
result+=mp[cum_xor];
... | ALGO | 0.999971 | 5.362931 |
ed538a7d-beff-496b-aac1-3d2f7b3ce6c8 | NazrulIslamSajib/number_theroy | New/Tao and sigma.cpp | ///tao hocche number of divisor
///n er prime factorization korle eder 16*3=2^4 * 3^1
///tahoe n er divisor hbe=(4+1)+2 special 2 jog karon combination korle
///eidike 0 dite pare abar oi dike 0 dite pari.
///sigma hocche=joto gula divisor ache eder sums sigma=(p1^(e1+1)-1)/(p1-1)..p2,pr eivabe sob prime factor
#includ... | ALGO | 0.998013 | 4.650847 |
cb94f175-f617-4f33-97ad-ba563bc4f221 | phitronio/AlgorithmBatch3 | Week 2 & 3/Problems/CSES/Counting Rooms.cpp | #include<bits/stdc++.h>
using namespace std;
void init_code()
{
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif // ONLINE_JUDGE
}
typedef pair<int,int> pii;
const int N = 1e3+10;
vector<string> g;
int visited[N][N];
int n,m;
vector<pii> direc = {{0,-1},... | ALGO | 0.999192 | 4.443238 |
c5c8e291-aa39-4806-a616-eb1332069220 | manoandsu/competitive-programming | uri/1835.cpp | #include <bits/stdc++.h>
using namespace std;
int t, n, m, fr, to, ans;
int main() {
cin.tie(NULL);
ios_base::sync_with_stdio(false);
cin >> t;
for (int k=1;k<=t;++k) {
cin >> n >> m;
vector<vector<int>> adj(n+1);
vector<bool> vis(n+1);
for(int i... | ALGO | 0.999576 | 4.396341 |
e5050e05-80a0-4629-9669-f8098bf9eefb | ShimuGuyue/AlgorithmPractice-Codes | Codeforces/题库/CF1902B.cpp | // $$$$$$\ $$\ $$\ $$\ $$$$$$\ $$$$$$\ $$$$$$\
// $$ __$$\ $$ | \$$\ $$ |$$ __$$\ \_$$ _|$$ __$$\
// $$ / $$ |$$ | \$$\ $$ / $$ / \__| $$ | $$ / $$ |
// $$$$$$$$ |$$ | \$$$$ / \$$$$$$\ $$ | $$$$$$$$ |
// $$ __$$ |$$ | \$$ / \____$$\ $$ | $$ __$$ |
// $$ | $$ |$$ | ... | ALGO | 0.999631 | 3.440989 |
27aa0092-c698-4b6d-ab8e-1152ee5bb56a | xnmng/LeetCode | 2178-maximum-split-of-positive-even-integers/2178-maximum-split-of-positive-even-integers.cpp | class Solution {
public:
// if finalSum is odd, cannot generate maximum even split
// since we want longest split
// iteratively generate the even numbers starting with 2,4,6, ...
// any remainder add to last element
vector<long long> maximumEvenSplit(long long finalSum) {
if (finalSum % 2 =... | ALGO | 0.999877 | 4.987764 |
b5f70ebf-9777-4346-8ce9-52430933b3f0 | raincross7/code-similarity | codes/train_code/problem424/problem424_376.cpp | #include <bits/stdc++.h>
using namespace std;
using ll =long long;
typedef pair<int,int> P;
#define SORT(a) sort((a).begin(),(a).end())
#define rSORT(a) reverse((a).begin(),(a).end())
#define For(i, a, b) for(int i = (a) ; i < (b) ; ++i)
#define rep(i, n) For(i, 0, n)
#define debug(x) cerr << #x << " = " << ... | ALGO | 0.999721 | 3.888984 |
90ef3977-577f-454b-9b80-3d0c53353372 | TensoriumCore/CurvatureEngine | srcs/Metric/KerrdS.cpp | #include <Geodesics.h>
extern float (*geodesic_points)[5];
extern int num_points;
extern float a;
float Lambda = 1e-4;
void Metric::calculate_metric_kds(const std::array<float, NDIM>& x,
std::array<std::array<float, NDIM>, NDIM>& g,
std::array<std::... | ALGO | 0.998436 | 5.20174 |
b4ac3f4d-4920-40ea-9c51-e703999e1b06 | ishandutta2007/codeforces | flowerletter/normal/555/E.cpp | /*mjytxdy!*/
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define all(x) x.begin(),x.end()
#define SZ(x) ((int)x.size())
#define pii pair<int,int>
#define pil pair<int,ll>
#define pli pair<ll,int>
#define pll pair<ll,ll>
#define inl inline
#define rep(i,l,r) for(... | ALGO | 0.999987 | 4.040187 |
a87039d4-a99a-4f34-af2a-a58f16f1de2b | HekpoMaH/Olimpiads | Shkola Kyrdjali/trenirovy4no/Тренировъчнo/gift/author/gift-integer_overflow.cpp | #include <ctime>
#include <algorithm>
#include <cstring>
#include <string>
#include <vector>
#include <queue>
#include <iostream>
#include <cmath>
#include <sstream>
#include <map>
#include <set>
#include <cstdio>
#include <bitset>
using namespace std;
#define pb push_back
#define INF 1000000000
#define L(s) (int)((s).... | ALGO | 0.998507 | 3.699025 |
a0b86e18-903f-4ec5-bef1-4bf91a47ecf7 | Quantum-Annealling/Quantum-Annealing-lab | Quantum Annealing C++/simulation.cpp | #include <iostream>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <vector>
#include <fstream>
#include <cstring>
using namespace std;
static const double fraction = 1.0 / (RAND_MAX + 1.0);
void printMatrix(vector<vector<double> > matrix){
for (int i=0; i<matrix.size(); i++){
for (int j=... | ALGO | 0.99989 | 4.194715 |
565e0b9a-a46b-41f1-831d-8b939966db9a | Nafiz-Nasim/Codeforces- | Random/Team.cpp | #include <iostream>
using namespace std;
int main()
{
int test, count = 0;
cin>>test;
while (test--)
{
int a, b, c;
cin >> a >> b >> c;
if ((a == 1 & b == 1) || (b == 1 & c == 1)||(c == 1 & a == 1)) count++;
}
cout << count;
return 0;
}
| ALGO | 0.999218 | 4.828752 |
ca30617f-c885-43c2-a1bf-0091d15aa7b5 | MirageM/NeetCode-RoadMap-CPP | Arrays & Hashing/encodedecode12.cpp | class Solution {
public:
string encode(vector<string>& strs) {
string result = "";
for(int i = 0; i < strs.size(); i++){
string str = strs[i];
result += to_string(str.size()) + "#" + str;
}
return result;
}
vector<string> decode(string s) {
... | ALGO | 0.999443 | 5.685983 |
c7424c36-ee7d-4dc8-9538-0ca9d68516cb | raincross7/code-similarity | codes/train_code/problem285/problem285_173.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
int n;
for (;;) {
cin >> n;
if (n == 0) break;
vector<int> s(n);
for (int i = 0; i < n; i++) {
cin >> s[i];
}
sort(s.begin(), s.end());
int sum = ... | ALGO | 0.999962 | 4.562378 |
5bf03c75-a76d-4cbd-825b-95d4e79b24c2 | Fungucide/Contest | phantom3.cpp | #ifndef _MSC_VER
#include <bits/stdc++.h>
#else
#include <stdio.h>
#include <iostream>
#include <math.h>
#include <algorithm>
#include <functional>
#include <string>
#include <vector>
#include <unordered_map>
#include <queue>
#include <regex>
#define scanf scanf_s
#endif
#define ll long long
#define ull unsigned l... | ALGO | 0.999546 | 3.255191 |
f2b82810-b8b3-4434-8542-64d07873ad33 | Ayesha049/all_contest_codes | JULY 2017/7 july/B. Worms.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
vector<int>v;
int s=0;
int x;
for(int i=0;i<n;i++)
{
scanf("%d",&x);
s+=x;
v.push_back(s);
}
std::vector<int>::iterator low;
int m;
cin>>m;
for(int i=0;i<m;i++)
{
... | ALGO | 0.999945 | 3.807091 |
ed5ebb5b-2a61-461d-ae13-bae8f6e6519c | mirzan7/dsa- | find_missing_number.cpp | #include<iostream>
#include<vector>
using namespace std;
int findmissingnumber(vector<int> ar)
{
int l = 0, r = ar.size()-1;
while (l <= r)
{
int mid = (l + r) / 2;
if (ar[mid] != mid + 1 && ar[mid - 1] == mid)
return mid + 1;
if (ar[mid] != mid + 1)
{
... | ALGO | 0.997694 | 3.877268 |
8bd1f031-e461-4956-8a3c-fe45be744b45 | ishandutta2007/codeforces | monogon/normal/1203/D1.cpp |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
const int MAX_N = 2e5 + 5;
string s, t;
// posl[i] = minimum length prefix of s containing t[0, ..., i).
// posr[i] = minimum length suffix of t containing t[i, ...]
int posl[MAX_N], posr[MAX_N];
int main() {
ios::sync_with_stdio(false);
cin... | ALGO | 0.999944 | 4.56682 |
76a218ab-06c0-4d47-b347-777d01575d6f | TheCloudlet/leetcode-in-cpp | linked-list/019-remove-nth-node-from-end-of-list/2-pass-good-taste.cpp | class Solution {
public:
ListNode *removeNthFromEnd(ListNode *head, int n) {
ListNode **ptr = &head; // it is not necessary to use indirect pointer here
int length = 0;
// Calculate the length of the linked list
while (*ptr) {
length++;
ptr = &(*ptr)->next;
}
/* Using indirect po... | ALGO | 0.999906 | 6.860114 |
e863d6d9-1846-48aa-a264-c07d9503d732 | jainamandelhi/Leetcode | DP/1143. Longest Common Subsequence.cpp | #define ll int
class Solution {
public:
int longestCommonSubsequence(string s1, string s2) {
int n=s1.size(),m=s2.size();
vector<vector<ll> >arr(n+1,vector<ll>(m+1));
for(int i=1;i<=n;i++)
{
for(int j=1;j<=m;j++)
{
if(s1[i-1]==s2[j-1])
... | ALGO | 0.999967 | 5.935995 |
f5407f00-922a-4903-8136-b682aa3b5351 | darkdragon1900/CPP_Assginment_1 | q3.cpp | /*
3.Write a program to print the area and perimeter of a triangle having sides of 3, 4 and 5 units by
creating a class named 'Triangle' with a function to print the area and perimeter.
*/
#include<iostream>
using namespace std;
class triangle{
private:
int a,b,c;
float area,per;
public:
void get(int x,int y,... | ALGO | 0.997134 | 4.428468 |
22ddaee8-3e84-4d8d-823e-51a44ac1a5af | ajitydv1/CPP | move_semantics/l_value_r_value.cpp | #include<iostream>
using namespace std;
void print(int &x)
{
cout <<" l value int& "<<endl;
}
void print(const int& x)
{
cout<<" l_value const int&"<<endl;
}
void print(int && x)
{
cout<<" r_value bind to r value reference int &&"<<endl;
}
int main()
{
int x=3;
print(x); // here l value is bind with l value
p... | TOOL | 0.878359 | 4.583248 |
2e7819aa-dd97-404a-b8f7-2ddef4afc90b | TeamJDCoin/JDCoin | src/kernel.cpp | #include <boost/assign/list_of.hpp>
#include "kernel.h"
#include "db.h"
using namespace std;
extern int nStakeMaxAge;
extern int nStakeTargetSpacing;
// Modifier interval: time to elapse before new modifier is computed
// Set to 6-hour for production network and 20-minute for test network
unsigned int nModifierInte... | ALGO | 0.997588 | 6.190326 |
c86cc020-d31d-4b40-a609-643b103e5c4b | luhouyang/codeforce-journey | 2024/oct/13_10/min_dif.cpp | #include <bits/stdc++.h>
using namespace std;
long long a[200000];
int t, n, i;
long long mn, mx, s;
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cin >> t;
while (t--)
{
cin >> n;
for (i = 0; i < n; i++)
cin >> a[i];
mn = 1e18;
mx = -1;
... | ALGO | 0.999674 | 4.047255 |
32bf1a20-4761-403d-b53a-63527252cf9d | Jiangluyu/Leetcode | 4. Median of Two Sorted Arrays.cpp | class Solution {
public:
double findMedianSortedArrays(vector<int>& nums1, vector<int>& nums2) {
int len1 = nums1.size();
int len2 = nums2.size();
int mid = (len1 + len2 + 1) / 2;
if (len1 > len2){
nums1.swap(nums2);
swap(len1, len2);
}
int st... | ALGO | 0.999979 | 6.361589 |
099d3647-bff6-4f53-aedb-7f785196b12d | NadidLinchestein/CS201-ElementaryDataStructures | Unit 1/Linked Lists/DoublyLinkedList.cpp | /*
C++ doubly linked list:
Insertion at both ends.
Deletion of a node by value.
Searching for a value.
Forward & backward traversal.
Proper memory management with a destructor.
*/
#include <iostream>
using namespace std;
// Node structure for a doubly linked list
struct Node {
int data; ... | ALGO | 0.999625 | 7.248923 |
d2e90a7a-38ca-476c-9246-39a0cd895287 | Robin329/CPlusPlusThings | learn_algorithms/leetcode/algorithms/cpp/binaryTreeRightSideView/binaryTreeRightSideView.cpp | // Source : https://leetcode.com/problems/binary-tree-right-side-view/
// Author : Hao Chen
// Date : 2015-04-07
/**********************************************************************************
*
* Given a binary tree, imagine yourself standing on the right side of it,
*return the values of the nodes you can s... | ALGO | 0.999952 | 6.351758 |
e49fecdb-282b-4f63-9ce9-70b808effdce | WalkerHC30/fitness | 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.998733 | 6.76775 |
b0a75ed2-b48b-485c-af02-54d096c28366 | Anzanda/baekjoon | 18265.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main(void){
ll n;
cin >> n;
ll start =0;
ll end = INT32_MAX;
ll ans =0;
while(1){
ll mid = (start+end) >> 1;
ans = mid - (mid/3) - (mid/5) + (mid/15);
// printf("ans: %d\n", ans);
if(ans < n... | ALGO | 0.99998 | 3.395269 |
94161127-b23c-43bc-a0db-b259a2f50e4a | Thiraput01/Algorithm-design-2024 | Grader/ex01e4.cpp | #include <bits/stdc++.h>
using namespace std;
int x, n, k, tmp;
int perform(int x, int n, int k){
if(n==1){
return x % k;
}
if(n%2==0){
tmp = perform(x, n/2, k);
return (tmp * tmp) % k;
}else{
tmp = perform(x, n/2, k);
tmp = (tmp * tmp) % k;
return (tmp ... | ALGO | 0.999963 | 4.238766 |
c66b4d65-702f-40e7-bbc1-328977bb33bf | tubagusfirmansyah/UTS-Dasar-Pemrograman- | Pengulangan for Bersarang.cpp | #include <iostream>
using namespace std;
int main()
{
for(int j=1; j<=10; j++) {
for(int k=1; k<=j; k++){
cout << k*j << ' ';
}
cout << "\n";
}
return 0;
}
| ALGO | 0.999839 | 4.042616 |
5e24dc99-3b8f-4893-8cc2-2cce3fb928fd | avgorshk/cuda-2025 | 3822B1FI1/1_gelu_omp/mironov_arseniy/gelu_omp.cpp | #include "gelu_omp.h"
#include <cmath>
#include <omp.h>
#define PI 0.797884f
AlignedVector GeluOMP(const AlignedVector& input) {
AlignedVector result(input.size());
#pragma omp parallel for
for (std::size_t it = 0; it < input.size(); ++it) {
float x = input[it];
result[it] = 0.5f * x * (1.f + std::tanh(PI * (... | ALGO | 0.994058 | 4.296237 |
40e2dda3-1b7f-4cc5-bbf2-6b7881de69dd | Alvee78/Codeforces | CodeForces/Contest/D_DD.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
ll a5[31],a3[45],n;
cin>>n;
a5[0]=1;
a3[0]=1;
for(int i=0;i<27;i++){
a5[i]=a5[i-1]*5;
}
for(int i=0;i<45;i++){
a3[i]=a3[i-1]*3;
}
for(int i=0;i<25;i++)
{
for(int j=0;j<40;j++){
if(a5[i]+a3[j]==n){
cout<<j<<" "... | ALGO | 0.99968 | 3.281651 |
fcd704ca-e748-4292-8b65-e0e77e86d144 | Tushar1805/coding_roadmap | Leetcode/Easy/replaceAllDigitsWithChars.cpp | //! 1844. Replace All Digits with Characters
// You are given a 0-indexed string s that has lowercase English letters in its even indices
// and digits in its odd indices.
// There is a function shift(c, x), where c is a character and x is a digit,
// that returns the xth character after c.
// For example, shift('a'... | ALGO | 0.999083 | 6.347558 |
c1b46a86-7df5-4b85-852f-2c111ea2826f | cjlworld/OJ | Ybt/1302.cpp | #include<cstdio>
#include<cstring>
#include<iostream>
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
const int N=1e5+5;
int f[N],g[N],a[N];
int n;
int main()
{
int i,T,cmax,cmin,ans;
cin>>T;
while(T--) {
memset(a,0,sizeof a);
memset(f,0,sizeof f);
memset(g,0,sizeof g);
scanf("%d... | ALGO | 0.999857 | 4.11909 |
69998e9d-864c-4149-a347-974ccc25d025 | alanthie/CryptoChat | src/vigenere.cpp | #include <stdio.h>
#include <string.h>
#include <string>
#include <iostream>
#include <stdio.h>
#include <ctype.h>
#include "../include/vigenere.hpp"
namespace cryptoAL_vigenere
{
int myisalnum(int c)
{
if (c < 0 || c> 127) return 0;
return isalnum(c);
}
int index(char c)
{
f... | ALGO | 0.990702 | 5.133172 |
9aea9f3b-da25-471d-af5b-5ef0b082d942 | akanerva/CSES | sliding_median/main.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> orderedMultiset;
/**
* akanerva
* Eka kerta kun käytän g++ -funktiota, tietääkseni.
* Ordered_multiset toi... | ALGO | 0.999996 | 3.792024 |
8b3aeebc-fe32-4838-8e1c-ef4f9cbb4ada | tccoin/cpp-playground | leetcode/l108-convert-sorted-array-to-binary-search-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.999989 | 7.156781 |
af225040-7d53-4d0d-9dc2-079f10f721c2 | Chansir00/my_c-plusepluse | c1.cpp | #include <iostream>
#include <cmath>
using namespace std;
#include<iostream>
#include<vector>
using namespace std;
struct stu
{
int m_num;
double m_score;
};
int main()
{
int n, k;
cin >> n >> k;
stu std[n];
for (int j = 0; j < n; j++) {
cin >> std[j].m_num;
cin >> std[j].m_sc... | ALGO | 0.999973 | 4.108291 |
552e1047-4896-41bb-9948-59fcdf962450 | deepakprasad1243/coding | Range Queries/Subarray Sum Queries.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define rsz resize
#define endl '\n'
#define all(x) begin(x), end(x)
#define sz(x) (ll)(x).size()
#define pi pair<int,int>
#define x first
#define y second
#define p(x,y) pair<x, y>
#define tll tuple<ll,ll,ll>
#define v(x) vec... | ALGO | 0.999944 | 4.455571 |
a3a4c231-c1c4-429c-85c5-73e71b9f84cb | happylun/SketchModeling | Fusion/3rdparty/libigl/include/igl/biharmonic_coordinates.cpp | template <
typename DerivedV,
typename DerivedT,
typename SType,
typename DerivedW>
IGL_INLINE bool igl::biharmonic_coordinates(
const Eigen::PlainObjectBase<DerivedV> & V,
const Eigen::PlainObjectBase<DerivedT> & T,
const std::vector<std::vector<SType> > & S,
Eigen::PlainObjectBase<DerivedW> & W)
{
r... | ALGO | 0.993076 | 6.093999 |
1d4cf73f-2c3b-4983-876e-dd8796cc98c8 | dlawotjr1999/CS | CS-Theory/DataStructure/DoubleLinkedList.cpp | #include <iostream>
#include <cstdlib>
template <typename T>
struct Node {
T data;
Node<T>* prev;
Node<T>* next;
Node(T value) : data(value), prev(nullptr), next(nullptr) {}
};
template <class T>
class DoubleLinkedList {
private:
Node<T>* head;
Node<T>* tail;
public:
DoubleLinkedList() :... | ALGO | 0.999577 | 6.059786 |
4d54731e-1229-4eff-b24e-fa12a418fbd6 | averageguy989/Prototype-o1 | 23.cpp | #include <iostream>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <stack>
#include <deque>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <string>
#include <sstream>
#include <bitset>
#include <limits>
using namespace std;
... | ALGO | 0.999711 | 3.660212 |
3805894a-f0d9-4878-802d-9f740f54e427 | kamillyvm/Algoritmos | Lista 2/L2Q4.cpp | //Num determinado Estado, para transferncias de veculos o DETRAN cobra uma taxa de 1% para carros
//fabricados antes de 1990 e uma taxa de 1.5% para os fabricados a partir de 1990, taxa esta que incide
//sobre o preo do carro. Elabore um algoritmo que leia o ano e o preo do carro, calcule e escreva o
//imposto a ser... | TOOL | 0.991048 | 4.044616 |
c4575ac2-40db-425d-b5bd-d47bc649fd3b | godfatehr/pt_yolox_TT100K_640_640_73G_2.0 | code/demo/ncnn/android/app/src/main/jni/yoloXncnn_jni.cpp | #include <android/asset_manager_jni.h>
#include <android/bitmap.h>
#include <android/log.h>
#include <jni.h>
#include <string>
#include <vector>
// ncnn
#include "layer.h"
#include "net.h"
#include "benchmark.h"
static ncnn::UnlockedPoolAllocator g_blob_pool_allocator;
static ncnn::PoolAllocator g_workspace_pool_al... | TOOL | 0.893807 | 6.238286 |
c4fec6d2-3ad0-42db-8e80-45ced1a13906 | AnkitMourya12/-CrackYourPlacement | Container With Most Water.cpp |
class Solution {
public:
int maxWater(vector<int> &arr) {
// code here
int s=0,e=arr.size()-1,maxarea=0,area=0;
while(s<e){
area=min(arr[s],arr[e])*(e-s);
maxarea=max(maxarea,area);
if(arr[s]<arr[e]) s++;
else e--;
}
return... | ALGO | 0.999819 | 6.410331 |
643279ab-aba7-4f08-a769-05ddcab609be | QuKunLab/scSO | scSO_py/eigen-3.3.8/doc/snippets/MatrixBase_all.cpp | Vector3f boxMin(Vector3f::Zero()), boxMax(Vector3f::Ones());
Vector3f p0 = Vector3f::Random(), p1 = Vector3f::Random().cwiseAbs();
// let's check if p0 and p1 are inside the axis aligned box defined by the corners boxMin,boxMax:
cout << "Is (" << p0.transpose() << ") inside the box: "
<< ((boxMin.array()<p0.array(... | ALGO | 0.984431 | 3.51303 |
9002c119-e83a-4ffc-8914-e596895ca76c | shunak/cpp-sandbox | alg/c_prac_prjct/binary_search_by_stl_lower_bound.cpp | #include <iostream>
#include <stdio.h>
#include <algorithm>
using namespace std;
int A[1000000], n;
int main(){
cin >> n;
for(int i = 0; i < n; i++)
{
scanf("%d",(A+i));
// scanf("%d",&A[i]);
}
int q, k, sum=0;
cin >> q;
for(int i = 0; i < q; i++)
{
... | ALGO | 0.999757 | 3.834909 |
6ff3c3a3-d1fe-4927-b3bc-307659edc4d3 | Exr0nProjects/learn_cpp | problems/contests/dated/2020_06_12/x1_hdu1698/xmain_1_hdu1698.cpp | /*
* Problem 1_hdu1698 (contests/dated/2020_06_12/1_hdu1698)
* Create time: Sat 13 Jun 2020 @ 13:00 (PDT)
* Accept time: Mon 15 Jun 2020 @ 09:45 (PDT)
*
*/
#include <iostream>
#include <cstring>
#include <sstream>
#include <cstdio>
#include <tuple>
#include <vector>
#include <string>
#include <list>
#include <arr... | ALGO | 0.999633 | 4.673721 |
7317a1fc-40c4-415e-b0f8-d9f6c54a1cf2 | fciapsa/Competitive-Programming | AceptaElReto/564MisteriosoCasoMultiplosDe7.cpp | #include <iostream>
#include <vector>
#define ll long long
using namespace std;
std::vector<int> v(500001,0);
void init() {
int val = 2;
for (int pot = 2; pot <= 500000; ++pot) {
val *= 2;
val %= 7;
if (val == 1) v[pot] = v[pot - 1] + 1;
else v[pot] = v[pot - 1];
}
}
int main() {
int n, x;
init();
ci... | ALGO | 0.999734 | 3.674546 |
6183cc6d-1405-47f6-b20c-16acea91b369 | carlosmargraf/Exercicios-Beecrowd | 1115 - Quadrante.cpp | #include<iostream>
using namespace std;
int main(int argc, char const *argv[])
{
int x, y;
while(cin >> x >> y)
{
if(x > 0 && y > 0)
{
cout << "primeiro" << endl;
}
if(x < 0 && y > 0)
{
cout << "segundo" << endl;
}
if(x < 0 &... | ALGO | 0.999936 | 3.578874 |
94816ee6-c9ac-4f26-9dba-d57d27114950 | LiKe-rm/Human-and-ChatGPT-Code-Dataset | Codes Generated From ChatGPT/cpp_gpt4_功能重现/authors7_am009_PAT_A1153-Decode-Registration-Card-of-PAT_main-old.cpp | #include <cstdio>
#include <iostream>
#include <vector>
#include <set>
#include <string>
#include <algorithm>
#include <map>
#define ONLINE_JUDGE
#ifndef ONLINE_JUDGE
#define DEBUG(X) std::cout << (X) << std::endl;
#else
#define DEBUG(X)
#endif
struct total {
int people;
int score;
};
struct compare {
b... | ALGO | 0.997911 | 4.953986 |
a1d238e8-c4d7-474b-9766-d9c978c12307 | Feline-A/TLX-competitive-programming | Pola 2/Feline-Pola2.cpp | #include <iostream>
using namespace std;
int main(){
int n, i, j, z;
cin >> n;
for (i=1;i<=n;i++){
for(j=n-i;j>=1;j--){
cout << " ";
}
for(z=1;z<=i;z++){
cout << "*";
}
cout << "\n";
}
return 0;
}
| ALGO | 0.999932 | 3.751946 |
fbc36326-162d-4859-8df5-a1219334d4b1 | VixenLights/Vixen | src/Vixen.Common/Box2D/Collision/b2CollideCircle.cpp | #include <Box2D/Collision/b2Collision.h>
#include <Box2D/Collision/Shapes/b2CircleShape.h>
#include <Box2D/Collision/Shapes/b2PolygonShape.h>
#pragma warning( disable : 4456 )
void b2CollideCircles(
b2Manifold* manifold,
const b2CircleShape* circleA, const b2Transform& xfA,
const b2CircleShape* circleB, const b2Tr... | ALGO | 0.998228 | 7.753568 |
ba01debf-e0d6-4f2c-8b93-ab41ce3c8c33 | raincross7/code-similarity | codes/train_code/problem102/problem102_137.cpp | #include <bit>
#include <bitset>
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <set>
#include <map>
#include <vector>
#include <math.h>
#include <stdlib.h>
#include <queue>
#include <stack>
typedef long double ld;
typedef long long ll;
... | ALGO | 0.999923 | 3.391745 |
1d53554a-9e4d-4198-9e67-dd5ae77241b9 | ishandutta2007/codeforces | mango_lassi/normal/913/A.cpp | #include <iostream>
using namespace std;
typedef long long ll;
int main() {
ll n, m;
cin >> n >> m;
if (n > 40) n = 40;
cout << (m % (((ll)1)<<n)) << '\n';
} | ALGO | 0.999867 | 3.146568 |
1234841a-0921-4e62-841b-ff8334710b8e | samkitshah1262/CMCP | BS/A_New_Year_Transportation.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
using pi = pair<int, int>;
using pl = pair<ll, ll>;
#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)
#define pb push_ba... | ALGO | 0.999998 | 3.986371 |
40c3cbb2-159e-4629-b7e5-220b1343468d | mosel123/codeC- | ejemplos/hhmmss.cpp | #include <iostream>
using namespace std;
void conv_seg(int tiempo);
int conv_tiemp(int seg, int min, int hr);
int resta_seg(int segEnt, int segSal);
//01:05:23 01:05:59 01:59:59 23:59:59
//01:05:24 01:06:00 02:00:00 00:00:00
int main()
{
int se, ss, me, ms, he, hs;
int result=0;
int segEnt, segSal, tiempo;... | ALGO | 0.974049 | 3.348197 |
445db2d1-70c9-4b94-8d4a-8d05283892ee | thebesttv/00.ACM | 03.CodeForces/607_2/ori.cpp | #include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<climits>
#include<cmath>
#include<ctime>
#include<vector>
#include<queue>
#include<stack>
#include<list>
#include<set>
#include<map>
#include<utility>
#include<algorithm>
using namespace std;
#define FOR(i,a,b) for(register int i=(a);i<(b... | ALGO | 0.997878 | 3.411138 |
c71fe07b-f70e-44e0-b177-46e6e49c6081 | asvishnevsky/signature-generator | scriptparser/scriptparser.cpp | // scriptparser.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <regex>
#include "Shlwapi.h"
#include <boost/regex.hpp>
#include <boost/date_time/gregorian/gregorian.hpp>
#include <boost/program_options.hpp>
#include <boost/filesystem.hp... | TOOL | 0.852106 | 3.630667 |
acb6e0b5-f40c-4776-90bb-0f96ca05cc6c | ishandutta2007/codeforces | johnkram/normal/1329/B.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
const int P=998244353,MAXN=100005,MAXM=20;
#define L 1048576
#define real double
#define eps 1e-9
char _buf[L],*S,*T,_buf1[L],*S1=_buf1;
inline char gc()
{
if(S==T)
{
T=(S=_buf)+fread(_buf,1,L,stdin);
if(S==T)return 0... | ALGO | 0.999974 | 3.877605 |
f6fa49d4-1cc8-46e4-981a-caeedf96007b | Praveenabi/CP-Progress-2025 | cp_journal/june/atcoder/abc_contest409/a_conflict.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n; cin>>n;
string T,A; cin>>T>>A;
bool ans = false;
for(int i = 0; i < n; i++)
{
if(T[i]=='o' && A[i]=='o')
{
ans = true;
break;
}
}
if(ans) cout<<"Yes\n";
else cout<<"No... | ALGO | 0.999953 | 4.243009 |
a4d19915-c5d1-4f38-91dd-1c11b7e28045 | kbaafi/autonomous-cars-highway-path-planning | src/Eigen-3.3/unsupported/doc/examples/MatrixFunction.cpp | #include <unsupported/Eigen/MatrixFunctions>
#include <iostream>
using namespace Eigen;
std::complex<double> expfn(std::complex<double> x, int)
{
return std::exp(x);
}
int main()
{
const double pi = std::acos(-1.0);
MatrixXd A(3,3);
A << 0, -pi/4, 0,
pi/4, 0, 0,
0, 0, 0;
std::... | ALGO | 0.999385 | 4.353816 |
5111d753-98f4-4d6b-ab54-77ef11bba68f | KimBoWoon/Algorithm_Study | Eureka.cpp | // 20113259 ǻͰк 3г 躸
// ˰ - Eureka Theorem
#include <iostream>
#include <fstream>
#include <vector>
using namespace std;
// ŭ ݺ ã´
bool eureka(vector<int> vec, int n) {
for (int x = 0; x < vec.size(); x++) {
for (int y = 0; y < vec.size(); y++) {
for (int z = 0; z < vec.size(); z++) {
if (vec[x] + vec[y... | ALGO | 0.999881 | 4.444689 |
82340c09-a05f-427a-a8ee-79dfcb97d25e | rani-ukamble/clg_cpp | quicksort.cpp | //Quick sort
#include <bits/stdc++.h>
using namespace std;
int partition(int arr[], int l, int h){
int i=l,j=h, pivot=arr[l];
while(i<j){
while(arr[i]<=pivot){
i++;
}
while(arr[j]>pivot){
j--;
}
if(i<j)
swap(arr[i],arr[j]);
}
swap(arr[l],arr[j]);
return j;
}
void quicksort(int arr[],int l,int h)... | ALGO | 0.999992 | 5.238799 |
269d1f10-c312-4832-bc1c-b2740cc4a2b7 | Mustafa42311/Autonomus-Warehouse-Robot | src/ldlidar_stl_ros2/ldlidar_driver/src/filter/tofbf.cpp | /**
* @file tofbf.cpp
* @author LDRobot (<EMAIL>)
* @brief LiDAR near-range filtering algorithm
* This code is only applicable to LDROBOT LiDAR LD06 products
* sold by Shenzhen LDROBOT Co., LTD
* @version 0.1
* @date 2021-10-28
*
* @copyright Copyright (c) 2021 SHENZHEN LDROBOT CO., LTD. All rights... | TOOL | 0.970894 | 5.172687 |
36f0b9b4-afdb-4d38-8784-ed29a192dcdf | Micro-Shubham/Data-structure | 02Pattern/06pattern.cpp | /*
1 4 9 16 25
1 4 9 16 25
1 4 9 16 25
1 4 9 16 25
1 4 9 16 25
*/
#include <iostream>
using namespace std;
int main()
{
for (int row = 1; row <= 5; row++)
{
for (int col = 1; col <= 5; col++)
{
int mul = col * col;
cout << mul << " ";
}
cout << endl;
}... | ALGO | 0.991208 | 3.867037 |
a18dc453-ec38-4237-94c0-cc3430ed928d | NicolasAuersvalt/Competitive-Programming | CodeForces/61A/61A.cpp | include <iostream>
#include <string>
using namespace std;
int main()
{
string s1, s2;
cin >> s1 >> s2;
for (size_t i = 0; i < s1.length(); ++i)
{
if (s1[i] == s2[i])
{
s1[i] = '0';
}
else
{
s1[i] = '1';
}
}
cout << s1;
... | ALGO | 0.999972 | 4.160051 |
1037343e-2df4-47ed-a051-3535a6a17b09 | dhruvik1999/Competitive-Programming | Leetcode/p39.cpp | #include<bits/stdc++.h>
using namespace std;
vector< vector<int> > ans;
void doWork( vector<int> &a, int ind,int n,int trg,int sum,vector<int> &temp){
if( trg==sum ){
ans.push_back(temp);
return;
}else if( sum>trg ){
return;
}
for(int i=0;i<n;i++){
temp.push_back( a[i] );
doWork(a,i,n,trg,sum+a[i],te... | ALGO | 0.99999 | 3.277928 |
c1072044-fa66-44a6-b124-2bb2f8579482 | quangloc99/CompetitiveProgramming | UVA/10661.cpp | /**
* Author: Tran Quang Loc (darkkcyan)
* Idea: It is not hard too see that the problem gave us a graph and ask us to solve the graph-coloring problem, or more over,
* to find the chromatic number. The idea is to search for the solution by bruteforcing until we find the smallest one.
* In order to reduce the runt... | ALGO | 0.999808 | 5.579502 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.