uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
4f91c50a-71f7-4059-9c43-72afc58862e5 | Vanshita2608/C-Codes | operator overloading 2.cpp | //operator overloading 2
#include<iostream>
using namespace std;
class relational
{
private:
int x , y;
public:
void setData()
{
cout<<"Enter the values of x and y:"<<endl;
cin>>x>>y;
}
void getData()
{
... | ALGO | 0.964956 | 4.043707 |
24a4fdff-5e45-47a0-87ae-1f99ca005bc6 | Coding1610/DSA | Recursion/Subsequence.cpp | #include<bits/stdc++.h>
using namespace std;
/*
void solve ( string str , string output , int index , vector<string> &ans ){
if( index >= str.length() ){
if( output.length() > 0 ){
ans.push_back(output);
return;
}
}
// Exclude - Recursion Call
solve( str , ou... | ALGO | 0.999902 | 4.588019 |
bb748b64-0a15-4ffa-b515-a9a2c2b46407 | Ibukhvalov/3DCurves | main.cpp | #include <iostream>
#include "containers/circlesContainer.h"
#include "containers/curvesContainer.h"
#include <cmath>
int main() {
CurvesContainer curvCont(100,20,30);
curvCont.print_at((float) M_PI_4);
CirclesContainer circCont(curvCont);
circCont.sort_by_radius();
std::cout << "Total sum of cir... | TOOL | 0.984021 | 5.200312 |
71030a52-8fe4-4368-98e2-8e195cf4b57e | Roonil03/GeeksForGeeksPotD_R03 | 06. Jun_2025/25Jun/checkIfEqual.cpp | class Solution {
public:
bool sameFreq(string& s) {
// code here
// unordered_map<char, int>freq;
// for(char c : s){
// freq[c]++;
// }
// for(char c {'a'};c <= 'z'; c++){
// if(!freq.count(c)){
// continue;
// }... | ALGO | 0.999983 | 4.860919 |
703d463d-d0a5-4bf8-a57d-8d3d20424122 | nn-firc/srcsdk | mathlib/sparse_convolution_noise.cpp | #include <math.h>
#include "basetypes.h"
#include <memory.h>
#include "tier0/dbg.h"
#include "mathlib/mathlib.h"
#include "mathlib/vector.h"
#include "mathlib/noise.h"
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
// generate high quality noise based upon "sparse convolution"... | ALGO | 0.998728 | 5.80142 |
0d9a7311-1989-46bd-a299-c7dabf79fc7e | GabrielCFormiga/URI-Beecrowd | Codigo/5 - Matemática/src/1264.cpp | #include <bits/stdc++.h>
#define _ ios_base::sync_with_stdio(0);cin.tie(0);
#define endl '\n'
#define pb push_back
using namespace std;
typedef long long ll;
typedef unsigned long long llu;
int horner(vector<int> &vec, int n){
int result = vec[0];
for(int i = 1; i < vec.size(); i++){
result = result ... | ALGO | 0.998639 | 3.381359 |
d2b16e38-ac8d-4961-b366-696d641d17c7 | andongmin94/algorithm | 프로그래머스/0/120861. 캐릭터의 좌표/캐릭터의 좌표.cpp | #include <string>
#include <vector>
using namespace std;
vector<int> solution(vector<string> keyinput, vector<int> board) {
vector<int> answer(2, 0);
//
for (const auto& e : keyinput)
{
if (e == "left" && board[0] / 2 * (-1) < answer[0]) answer[0]--;
if (e == "right" && board[0] / 2 > ... | ALGO | 0.999334 | 5.156256 |
65cf1e08-50a1-4b2b-a82c-9e5e46108cd5 | shikhak101/leetcode | ValidParentheses.cpp | class Solution {
public:
bool isValid(string s) {
stack<char> st;
for(int i = 0; i<s.length(); i++) {
if(s[i] == '(' || s[i] == '{' || s[i] == '[') {
st.push(s[i]);
}
else if(s[i] == ')') {
if(st.empty()) return false;
... | ALGO | 0.998695 | 6.162762 |
25fa7d56-7c10-49d7-96cc-f39bc79b33a8 | nn020701/OIER | xx/luogu/1251/1.cpp | #include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
#define ll long long
#define N 2005
#define M 1000005
#define INF 1000000000
inline int read(){
int x=0,f=1;char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=g... | ALGO | 0.999775 | 3.151989 |
81081e20-8f25-4525-9636-ced8e7966762 | Shalaby-VBS/Date_And_Time_Picker | 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 |
81330356-bef8-475c-945a-866f8fe40dab | kimwoonggon/FlappyBird-CPP-Raylib-RL-GRPO | main.cpp | #include <raylib.h>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <vector>
#include <cmath>
#include <iostream>
#include <onnxruntime_cxx_api.h>
#include <memory>
#include <string>
#include <array>
#include <fstream>
#include <random>
#include <chrono>
unsigned seed = std::chrono::system_clock::now... | ALGO | 0.992156 | 7.103563 |
84eba2e0-53a4-43ff-be1a-a1c8e4078055 | BrownBoyH/idkBro_ | omega up/ejercicio 29.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int N, K, valores, deno = 0;
cin >> N >> K;
for (int i = 0; i < N; i++)
{
cin >> valores;
if ((valores % K) == 0)
{
deno++;
}
}
cout << deno << endl;
return 0;
} | ALGO | 0.999645 | 3.733788 |
282b98e6-857d-4445-8bac-5811ac9a94da | himanshumaharshi/LeetCode-DSA | 1298-reverse-substrings-between-each-pair-of-parentheses/reverse-substrings-between-each-pair-of-parentheses.cpp | class Solution {
public:
string reverseParentheses(string s) {
string result = "";
// Stack to store the positions of '('
stack<int> st;
for (int i = 0; i < s.length(); ++i) {
if (s[i] == '(')
st.push(result.size()); // Store the position of '(' in the res... | ALGO | 0.999952 | 6.384036 |
320993f3-1f02-4831-b550-613202acb0de | Fleker/gem5 | src/systemc/tests/systemc/misc/stars/star103832/star103832.cpp | /*****************************************************************************
star103832.cpp --
Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15
*****************************************************************************/
/*************************************************************************... | TEST | 0.851188 | 5.709166 |
4265fdd6-3a7d-438f-a4f1-9f20b4d84831 | JD-edu/opencv_cpp_study | 1201_histogram_equal.cpp | #include <opencv2/opencv.hpp>
#include <iostream>
#include <vector>
int main() {
// 이미지 읽기
cv::Mat img = cv::imread("./resource/hist_equ.jpg", cv::IMREAD_GRAYSCALE);
if (img.empty()) {
std::cerr << "Error: Unable to load image!" << std::endl;
return 1;
}
// 히스토그램 계산
int histSiz... | ALGO | 0.946315 | 5.978034 |
94715c18-21ba-44db-ab56-07e8664a4194 | AAARKO7/Competitive-Programming-Problem-Solving | Code forces/219158O/219158O.cpp | /*Calculator(contest 219158O)*/
#include<bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin >> s;
int a=0;
int b=0;
int i;
for(i=0 ; i<s.length() ; i++)
{
if(s[i] == '+' || s[i] == '-' || s[i] == '*' || s[i] == '/')
{
int dig=0;
for(int... | ALGO | 0.999984 | 3.856676 |
a8c3bb25-6e6b-45cf-8a24-f96df68f4278 | sshockwave/Online-Judge-Solutions | BZOJ/1455.cpp | #include <iostream>
#include <cstdio>
#include <cstring>
#include <cassert>
#include <cctype>
using namespace std;
typedef long long lint;
#define ni (next_num<int>())
#define nl (next_num<lint>())
template<typename T>inline T next_num(){
T i=0;char c;
while(!isdigit(c=getchar()));
while(i=i*10-'0'+c,isdigit(c=getch... | ALGO | 0.999985 | 3.827001 |
aac2c6fd-8455-43cd-ba50-c37a80d507e3 | zhangchunbao515/leetcode | leetcode-02/518. Coin Change 2/s4.cpp | // OJ: https://leetcode.com/problems/coin-change-2/
// Author: github.com/lzl124631x
// Time: O(AC)
// Space: O(A)
class Solution {
public:
int change(int amount, vector<int>& coins) {
vector<int> dp(amount + 1);
dp[0] = 1;
for (int j = 1; j <= coins.size(); ++j) {
for (int i = 1... | ALGO | 0.999943 | 6.147053 |
0596e834-6ec7-4148-871b-c55a6516fe0b | daisy611/Fusion | Networks/SCI/SCI/scr/library_fixed_uniform.cpp | #include "library_fixed_uniform.h"
#include "functionalities_uniform.h"
#include "library_fixed_common.h"
#ifdef SCI_HE
uint64_t prime_mod = sci::default_prime_mod.at(bitlength);
#elif SCI_OT
uint64_t prime_mod = (bitlength == 64 ? 0ULL : 1ULL << bitlength);
uint64_t moduloMask = prime_mod - 1;
uint64_t moduloMidPt = p... | ALGO | 0.997517 | 4.746107 |
4a1639f6-d086-4099-bfda-ec3f57a9c0f8 | rlawdgus/TIL | c/baekjoon/baekjoon/1로만들기(1463).cpp | #include <iostream>
#include <algorithm>
#define INF 1000001
using namespace std;
int cache[1000001];
int main() {
int N, tmp, tmp2, tmp3;
cin >> N;
cache[2] = 1;
cache[3] = 1;
for (int i = 4; i <= N; i++) {
tmp = tmp2 = tmp3 = INF;
if (cache[i - 1] != 0) tmp = cache[i - 1] + 1;
if (i % 3 == 0) tmp2 = c... | ALGO | 0.99996 | 3.909333 |
6f13a154-32e5-4aea-84ca-450d8561020d | Phisten/playground | leetcode/2444.count-subarrays-with-fixed-bounds.cpp | /*
* @lc app=leetcode id=2444 lang=cpp
*
* [2444] Count Subarrays With Fixed Bounds
*/
// @lc code=start
/*
1152575 (1,5)
1
11
115 +
>15 +
1152 +
>152 +
11525 +
>1525 +
115257
*/
class Solution
{
public:
long long countSubarrays(vector<int> &nums, int minK, int maxK)
{
int n = nums.size();
... | ALGO | 0.999835 | 5.981774 |
5939f51b-adff-48fe-96ce-667615a14617 | borussiam/baekjoon | 10000~/baekjoon10942/main.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
cin.tie(NULL);
ios::sync_with_stdio(false);
int n,a[2001],save[4001]={0},m;
cin >> n;
for(int i=1;i<=n;i++) cin >> a[i];
cin >> m;
for(int i=1;i<n;i++){
for(int j=0;j<i&&j<=n-i&&a[i-j]==a[i+j];j++)
save[2*i-1]+... | ALGO | 0.999941 | 3.853277 |
7a916bf8-c5d6-4321-ab5e-f39f02724805 | ishandutta2007/codeforces | suiseiseki/normal/1178/F2.cpp | #include <cstdio>
#include <cstring>
#define Maxn 1000
#define Maxm 1000000
#define Mod 998244353
int b[Maxm+5];
int a[Maxn+5];
int le[Maxn+5],ri[Maxn+5];
int n,m;
int f[Maxn+5][Maxn+5];
int dfs(int left,int right){
if(f[left][right]!=-1){
return f[left][right];
}
if(right+1==left){
return f[left][right]=1;
}
... | ALGO | 0.999997 | 4.488826 |
18839313-d000-4faf-afb6-0892dfcb83b7 | chunyang-wen/leetcode | LongestPalindromicSubstring.cpp | // http://www.cnblogs.com/TenosDoIt/p/3675788.html
class Solution {
public:
string longestPalindrome(string s) {
const int len = s.size();
if(len <= 1)return s;
int start, maxLen = 0;
for(int i = 1; i < len; i++)
{
//寻找以i-1,i为中点偶数长度的回文
int low = i-1, ... | ALGO | 0.999968 | 5.456903 |
a14d4ce8-aaf1-4603-93c2-c86bc753e0f2 | AbdulYadi/pgadmin3 | pgadmin/pgscript/utilities/m_apm/mapmipwr.cpp | /*
*
* This file contains the Integer Power function.
*/
#include "pgAdmin3.h"
#include "pgscript/utilities/mapm-lib/m_apm_lc.h"
/****************************************************************************/
void m_apm_integer_pow(M_APM rr, int places, M_APM aa, int mexp)
{
M_APM tmp0, tmpy, tmpz;
int nex... | ALGO | 0.999104 | 3.078989 |
45b1ffcb-68d7-4d4f-864e-5ffbd5099d68 | Deeperfinder/LLAMA-inference | kuiper/source/op/kernels/cpu/mha_kernel.cpp | #include "../cpu/mha_kernel.h"
#include <cuda_runtime_api.h>
#include "../kernels_interface.h"
namespace kernel {
void mha_kernel(int32_t pos, int32_t head_num, int32_t layer_index, int32_t seq_len, int32_t kv_dim,
int32_t kv_mul, int32_t head_size, const tensor::Tensor& mha_out,
const t... | ALGO | 0.931129 | 5.596859 |
403423d4-9cbd-4e2f-8ced-8c72b2c5b1b3 | kgod1234/FRA163_Robotic_Studio | shootercpp/shooter.cpp | #include <iostream>
#include <math.h>
#include "shooter.h"
#include <bits/stdc++.h>
#include <iomanip>
shooter::shooter(const double length,
const double angle,
const double delta,
const double max_delta,
const double mass){
this->length = length... | TOOL | 0.853242 | 3.989187 |
fd3157d9-d3e6-404c-ab7f-7036497d6984 | cabelo/opencertiface | biometrics/3rdparty/eigen-eigen-c58038c56923/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_norm.cpp | #include <Eigen/Dense>
#include <iostream>
using namespace std;
using namespace Eigen;
int main()
{
VectorXf v(2);
MatrixXf m(2,2), n(2,2);
v << -1,
2;
m << 1,-2,
-3,4;
cout << "v.squaredNorm() = " << v.squaredNorm() << endl;
cout << "v.norm() = " << v.norm() << endl;
cout << "v.lpN... | ALGO | 0.996656 | 4.03798 |
c10405b8-ff1b-4e85-8d49-afe3205fe67d | ishandutta2007/codeforces | cephian/normal/1228/C.cpp | #include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target ("sse,sse2,sse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
typedef long long ll;
ll M = 1e9+7;
vector<ll> lp;
ll pww(ll a, ll b) {
if(b == 0) return 1;
if(b&1) return a * pww(a, b-1) % M;
ll t = pww(a, b/2);
return t * t % M... | ALGO | 0.999989 | 5.486162 |
d341bff5-8b5a-4d7b-8771-767fe8c496f2 | harshit-jain52/CP_DSA | codeforces/Edu/Two-Pointers/Step3_H.cpp | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define FASTIO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
typedef long long ll;
const int M = 1e9+7;
int main()
{
FASTIO
int n,m,s,A,B;
cin >> n >> m >> s >> A >> B;
int a[n], b[m];
for(int i=0;i<n;i++) cin >> a[i];
for(int j=0;... | ALGO | 0.999727 | 4.054888 |
54523203-6f44-4618-a886-afc3c8fa8822 | TimoRoth/BeeGFS | common/source/common/toolkit/MetadataTk.cpp | #include <common/app/log/LogContext.h>
#include <common/app/AbstractApp.h>
#include <common/net/message/storage/lookup/FindOwnerMsg.h>
#include <common/net/message/storage/lookup/FindOwnerRespMsg.h>
#include <common/storage/Metadata.h>
#include <common/threading/PThread.h>
#include "MetadataTk.h"
static std::shared_pt... | TOOL | 0.92982 | 6.971879 |
b90ae76a-3661-469f-9b36-7e607fdf2b27 | t0ny00/Inteligencia-1-Proyecto-1 | psvn-for-ci5437/global/distSummary.cpp | #include <vector>
#include "priority_queue.hpp"
int main(int argc, char **argv) {
int64_t totalNodes, numAtD; // counters
state_t state, child; // NOTE: "child" will be a predecessor of state, not a successor
int d, ruleid;
ruleid_iterator_t iter;
PriorityQueue<state_t> open; // used for the st... | ALGO | 0.99994 | 5.860444 |
b35d6f7d-34b1-424c-bb27-06f194493d52 | QbaoChain/qbe | src/cryptopp/ida.cpp | // ida.cpp - written and placed in the public domain by Wei Dai
#include "pch.h"
#include "config.h"
#include "ida.h"
#include "stdcpp.h"
#include "algebra.h"
#include "gf2_32.h"
#include "polynomi.h"
#include "polynomi.cpp"
ANONYMOUS_NAMESPACE_BEGIN
const CryptoPP::GF2_32 field;
NAMESPACE_END
NAMESPACE_BEGIN(Crypt... | TOOL | 0.956593 | 5.965723 |
d10ab25c-9305-4782-b899-ff1d5ff35a52 | fredrickhang/lammps | src/MANYBODY/pair_comb3.cpp | /* ----------------------------------------------------------------------
Contributing author: Ray Shan (Sandia, <EMAIL>)
Updates and debug: Tao Liang (U Florida, <EMAIL>)
Dundar Yilmaz (<EMAIL>)
------------------------------------------------------------------------- */
#include "pair_com... | TOOL | 0.954696 | 5.524035 |
4afcbaf2-cdef-4864-8380-b511595e4014 | ishandutta2007/codeforces | andrew.volchek/normal/576/C.cpp | #include <iostream>
#include <cstdio>
#include <string>
#include <string.h>
#include <queue>
#include <math.h>
#include <cmath>
#include <map>
#include <set>
#include <vector>
#include <algorithm>
#include <bitset>
#include <list>
#include <ctype.h>
#include <cassert>
#include <stack>
#include <fstream>
#include <unord... | ALGO | 0.999975 | 3.495328 |
642b741e-ceed-48f0-993a-dbe6ab501c17 | piratecash/piratecash | src/node/coin.cpp | #include <node/coin.h>
#include <txmempool.h>
#include <validation.h>
void FindCoins(std::map<COutPoint, Coin>& coins)
{
LOCK2(cs_main, ::mempool.cs);
CCoinsViewCache& chain_view = ::ChainstateActive().CoinsTip();
CCoinsViewMemPool mempool_view(&chain_view, ::mempool);
for (auto& coin : coins) {
... | TOOL | 0.916488 | 6.581671 |
701dee95-b68c-4adb-a1ca-dadad05d7469 | freicoin/freicoin | src/qt/guiutil.cpp | #include "guiutil.h"
#include "freicoinaddressvalidator.h"
#include "freicoinunits.h"
#include "qvalidatedlineedit.h"
#include "walletmodel.h"
#include "core.h"
#include "init.h"
#include "util.h"
#ifdef WIN32
#ifdef _WIN32_WINNT
#undef _WIN32_WINNT
#endif
#define _WIN32_WINNT 0x0501
#ifdef _WIN32_IE
#undef _WIN32_I... | TOOL | 0.851751 | 6.996406 |
1fc290aa-3f31-48b7-97c6-7d06221fbde0 | Juanito98/Competitive-Programming | SPOJ/String Reduction.cpp | #include <bits/stdc++.h>
#define optimizar ios_base::sync_with_stdio(0); cin.tie(0)
#define MAXN 302
#define INF (1 << 30)
using namespace std;
char cad[MAXN];
bool reduceA[MAXN][MAXN];
bool visA[MAXN][MAXN];
bool reduceB[MAXN][MAXN];
bool visB[MAXN][MAXN];
int memo[MAXN][MAXN];
bool visitados[MAXN][MAXN];
bool ch... | ALGO | 0.999699 | 3.626332 |
8a7a1ed8-510e-4e61-bf03-5b27a263b59f | CuuvuivevaSoixam/code | CodePTIT - DSA/DSA05005 - SỐ BƯỚC ÍT NHẤT.cpp | // https://code.ptit.edu.vn/student/question/DSA05005
// SỐ BƯỚC ÍT NHẤT
#include <bits/stdc++.h>
using namespace std;
void testCase() {
int n; cin >> n;
int a[n], f[n];
for (int i = 0; i < n; ++i) {
cin >> a[i];
f[i] = 1;
for (int j = 0; j < i; ++j) {
if (a[i] >= a[j])... | ALGO | 0.999497 | 5.149478 |
b00f3411-f7ca-4c13-acec-77ed4caf0eb3 | ychatz/spoj-solutions | swthin/swthin.cpp | #include <cstdio>
#include <cstdlib>
#include <map>
using namespace std;
int gcd(int a, int b) {
if ( b == 0 ) return a;
return gcd(b, a%b);
}
struct point {
int x, y;
} p[1010];
int main(void) {
int i, j, k, N, test = 0, ans, a, b, c, r;
pair<int, int> q;
while(scanf("%d", &N) && N) {
... | ALGO | 0.999658 | 3.976892 |
b993d568-ba78-4c4c-9880-9caac011fffa | minhkhuong2404/codeForce | codeForce/577A/main.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
long long n,x,ans = 0;
cin>>n>>x;
for (int i = 1; i <= n;i++){
if (x % i == 0 && i*n >= x){
ans += 1;
}
}
cout<<ans;
return 0;
} | ALGO | 0.99981 | 3.888835 |
36273155-4d41-4662-bbd7-2a7e72693aec | AdityaNarayan05/Leetcode-Solved-Questions | 0238-product-of-array-except-self/0238-product-of-array-except-self.cpp | class Solution {
public:
vector<int> productExceptSelf(vector<int>& nums) {
vector<int> ans(nums.size(),1);
for(int i=0,suf=1,pre=1,n=nums.size();i<n;i++){
ans[i]*=pre;
pre*=nums[i];
ans[n-1-i]*=suf;
suf*=nums[n-1-i];
}
return ans;
... | ALGO | 0.999978 | 5.866477 |
8fff1cc0-4ab1-48ff-b74b-5aa35b87f8b0 | alreadySagor/XPSC-Batch-4 | Week_6/Day_5/E_Wooden_Toy_Festival.cpp | /**
* author: SAGOR AHMED
* created: A P R I L , 2024
**/
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int tt;
cin >> tt;
while (tt--) {
int n;
cin >> n;
vector<int> v(n);
for (int i = 0; i < n; ... | ALGO | 0.999903 | 5.966045 |
c2078a8b-4f9b-43a5-8586-0b733f8beb20 | ShashankS04/DataStructures | matrix/rotate90.cpp | #include<iostream>
#include<algorithm>
using namespace std;
const int n=4;
void rotate(int m[n][n])
{
for(int i=0;i<n;i++)
for(int j=i+1;j<n;j++)
swap(m[i][j],m[j][i]);
for(int i=0;i<n;i++)
{
int low=0,high=n-1;
while(low<high)
{
swap(m[low][i],m[high][i]);
low++;
high--;
... | ALGO | 0.999992 | 3.713063 |
e2ed3c49-f06b-4c11-a7a4-e8ff9cd97ed1 | solomon-2105/DSA | 2478-longest-nice-subarray/2478-longest-nice-subarray.cpp | #include <vector>
using namespace std;
class Solution {
public:
int longestNiceSubarray(vector<int>& nums) {
int maxi = 1, cur = 0, left = 0, right = 0, n = nums.size();
while (right < n) {
while ((cur & nums[right]) != 0) {
cur ^= nums[left];
left++;
... | ALGO | 0.999978 | 6.089496 |
02785678-9765-4da8-8fdc-babe22c9c32c | amnosuperman/handtracking | src/libopentld/tld/EnsembleClassifier.cpp | /*
* EnsembleClassifier.cpp
*
* Created on: Nov 16, 2011
* Author: Georg Nebehay
*/
#include "DetectorCascade.h"
#include <cstdlib>
#include <cmath>
#include <opencv/cv.h>
#include "EnsembleClassifier.h"
using namespace std;
using namespace cv;
namespace tld
{
//TODO: Convert this to a function
#defin... | ALGO | 0.971163 | 5.596027 |
72434f6a-7860-4cd7-976a-e5fe88cab168 | prathixkk/DineGo | 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.998756 | 6.772262 |
b569304b-63b9-436a-b528-0ffcd5ca3a8a | raincross7/code-similarity | codes/train_code/problem175/problem175_323.cpp | #include<cstdio>
#include<algorithm>
using namespace std;
int main() {
#ifdef LOACL
freopen("in.txt","r",stdin);
freopen("out.txt","w",stdout);
#endif
int N;
long long ans=0,minb=1e9;
scanf("%d",&N);
for(int i=1;i<=N;i++) {
long long a,b;
scanf("%lld %lld",&a,&b);
ans+=a;
if(a>b)minb=min(minb,b);
}
p... | ALGO | 0.999942 | 3.393902 |
0ace4961-eaed-45c4-babc-edea2dfaf8ca | cksharma/coding | cpp/codeforces/contest_archive/hello2019/c.cpp | #include <bits/stdc++.h>
using namespace std;
void printMap(map<int, int>& mp) {
for( auto& [k, v] : mp ) {
cout << "[" << k << "=" << v << "], ";
}
cout << endl;
}
int main()
{
ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
cout.setf(ios::fixed); cout.precision(10);
int n; cin ... | ALGO | 0.999549 | 4.376734 |
ba5873a9-00d8-422f-a3ac-b26b85280fd8 | devhimal/oop-concepts | 05-array/2.cpp | #include <iostream>
#include <limits.h>
using namespace std;
int findSecondLargest(int arr[], int n)
{
int first = INT_MIN, second = INT_MIN;
for (int i = 0; i < n; i++)
{
if (arr[i] > first)
{
second = first;
first = arr[i];
}
else if (arr[i] > secon... | ALGO | 0.999977 | 4.684824 |
3cecac1b-9cee-43e7-be39-9ba2f617abd5 | Piau3425/Code-Practice | APCSS Summer Camp/K01.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
int n, m, a, b;
cin >> n >> m;
vector<vector<int>> v(n+1);
while (m--) {
cin >> a >> b;
v[a].push_back(b);
v[b].push_back(a);
}
for (auto &i : v) sort(i.begin(), i.end());
for (cin >... | ALGO | 0.999969 | 4.657224 |
9c399d80-43fe-48d9-a424-0480704bac7e | vgteam/libhandlegraph | src/ranked_handle_graph.cpp | #include "handlegraph/path_position_handle_graph.hpp"
/** \file ranked_handle_graph.cpp
* Implement methods for RankedHandleGraph.
*/
namespace handlegraph {
/// Return the rank of a handle (ranks start at 1 and are dense, and each
/// orientation has its own rank). Handle ranks may not have anything to do
/// wit... | ALGO | 0.952343 | 6.687897 |
31c7a430-22ae-48d2-b287-ee562a93c2ea | JerryYan97/OneWeekendRayTracer_OutputImage | 3rdparty/eigen-3.3.7/unsupported/doc/examples/MatrixSine.cpp | #include <unsupported/Eigen/MatrixFunctions>
#include <iostream>
using namespace Eigen;
int main()
{
MatrixXd A = MatrixXd::Random(3,3);
std::cout << "A = \n" << A << "\n\n";
MatrixXd sinA = A.sin();
std::cout << "sin(A) = \n" << sinA << "\n\n";
MatrixXd cosA = A.cos();
std::cout << "cos(A) = \n" << cos... | ALGO | 0.986438 | 5.878768 |
3bae35fa-562b-45f8-b698-a8b0b553cf4c | ModdenBF/Modden | src/kernel.cpp | #include "kernel.h"
#include "db.h"
#include "legacy/stakemodifier.h"
#include "script/interpreter.h"
#include "util.h"
#include "policy/policy.h"
#include "stakeinput.h"
#include "utilmoneystr.h"
#include <boost/assign/list_of.hpp>
/**
* CStakeKernel Constructor
*
* @param[in] pindexPrev index of the pare... | ALGO | 0.948003 | 5.913594 |
7a4b1277-5fb6-415b-b1a8-a7663f56a1d1 | AditiJ04/-CrackYourPlacements | Difficulty: Medium/Largest square formed in a matrix/largest-square-formed-in-a-matrix.cpp | //{ Driver Code Starts
// Initial Template for C++
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
// User function Template for C++
class Solution {
public:
/* int solve(vector<vector<int>>&mat,int i,int j,int &maxi)
{
if(i>=mat.size() || j>=mat[0].size())
{
... | ALGO | 0.999833 | 6.485637 |
36113b6a-a0bd-4814-812e-b3b7d61d8dce | Frederico-Messa/And-Star-Project | src/state_heuristics/delete_relaxation_heuristics/max.cpp | #include "./max.hpp"
int Max::operator[](const State &state) const
{
static vec<bool> are_freed_actions ((task.actions().empty()? NONE: task.actions().back().id) + 4);
static vec<int> actions_achieved_number_of_facts ((task.actions().empty()? NONE: task.actions().back().id) + 4);
Function this_function {&M... | ALGO | 0.999612 | 5.877043 |
120698f8-8764-4eca-9e1c-978165704479 | phucGR09/code_for_sol | domino.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll int64_t
#define fi first
#define se second
#define pb push_back
#define ve vector<ll>
#define vve vector<ve>
#define pa pair<ll, ll>
#define vpa vector<pa>
#define makefill(f, c) memset(f, c, sizeof(f))
#define faster ios_base::sync_with_stdio(0), cin.tie(0), cou... | ALGO | 0.99996 | 4.6407 |
0124ea69-d013-4514-b925-5c9a10ad8745 | officialrishabh123/cpp-pattern | main (17).cpp | /*
4
----------
A
B C
C D E
D E F G
*/
#include <iostream>
using namespace std;
int main()
{
int x;
cin>>x;
int i=1;
while(i<=x){
int j=1;
char count=64+i;
while(j<=i){
cout<<count<<" ";
j=j+1;
count=count+1;
}
... | ALGO | 0.99965 | 3.697632 |
10420a05-a1f4-442a-9574-a199dc803755 | vanphutin/DataStructureAndAlgorithms | src/_leetcode/greedy/#2294.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <ranges>
using namespace std;
class Solution
{
public:
int partitionArray(vector<int> &nums, int k)
{
sort(nums.begin(), nums.end());
int res = nums[0];
int ans = 1;
for (int i = 0; i < nums.size(); i++)
... | ALGO | 0.999945 | 5.865953 |
6999be8d-2c79-4ee0-ad21-eb2d4c1af1e7 | mac8088/noip | L4 信息学奥赛一本通/0. 程序部分/ch03/第01节 if选择结构/zy01_04_奇偶ASCII值判断.cpp | #include<cstdio>
using namespace std;
int main()
{
char c;
scanf("%c", &c);
if(c%2!=0) printf("%s", "YES");
else printf("%s", "NO");
return 0;
}
| ALGO | 0.999194 | 3.178463 |
d2574a6d-be1f-449c-a585-1501793cd094 | hanxzz/dsa-cpp | Lecture 36/quickSort.cpp | #include<iostream>
#include<algorithm>
using namespace std;
int partition(int arr[], int s, int e){
int pivot = arr[s];
int count = 0;
for(int i = s+1;i<e;i++){
if(arr[i]<pivot){
count++;
}
}
//placing pivot at right position
int pivotIndex = s+count;
swap(arr[p... | ALGO | 0.999957 | 5.278944 |
5b42c491-5cc6-4de1-a835-9e840218eaa7 | JJhuk/Cpp-Unmanaged-Programming | Assignment4/main.cpp | #include <cassert>
#include "TreeNode.h"
#include "BinarySearchTree.h"
using namespace assignment4;
int main()
{
BinarySearchTree<int> tree;
tree.Insert(std::make_unique<int>(10));
tree.Insert(std::make_unique<int>(15));
tree.Insert(std::make_unique<int>(5));
tree.Insert(std::make_unique<int>(4));
tree.Insert(... | TEST | 0.926293 | 6.613776 |
13fbea6f-b862-495e-a6ef-7ba297535f38 | Asevenx174/CP-source-code- | 01_CP_CODE_LIBRARY/number theory/prime number/bitwise_seive_exp.cpp | #include<iostream>
#include<math.h>
#define MAX 5000000
using namespace std ;
int arr[MAX];
/// like idx=32 ,pos=3
/// mane 4th bit ta change krte hbe
/// 1 er bin 00001 ek 3 ghor bame nei 1 << 3 ,so now 00001000 , ie value sathe 32 er
/// binary or krlei idx er index er pos th bit 1 hoy a jabe
int setbit(int idx,int p... | ALGO | 0.995209 | 3.112173 |
06d2e635-bb3a-4694-9e6e-40245b53ef25 | feof81/morganaPublic | tests/morganaFiniteElements/localMatrixEL3dTest1.cpp | #include <cmath>
#include <iostream>
#include <boost/mpi.hpp>
#include <boost/mpi/environment.hpp>
#include <boost/mpi/communicator.hpp>
#include "pMapItem.h"
#include "pMapItemShare.h"
#include "geoShapes.h"
#include "meshInit3d.hpp"
#include "fePr3d.hpp"
#include "feRt0LT3d.hpp"
#include "dofMapStatic3d.hpp"
#in... | ALGO | 0.91023 | 4.123785 |
c4324e1b-00b9-4a14-9681-0cd400d816be | raincross7/code-similarity | codes/train_code/problem026/problem026_126.cpp | #include <iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
if(a==1){
if(b==1){
cout<<"Draw"<<endl;
return 0;
}
cout<<"Alice"<<endl;
return 0;
}else if(b==1){
cout<<"Bob"<<endl;
return 0;
}
if(a>b){
cout<<"Alice"<<endl;
return 0;
}else if(a<b){
... | ALGO | 0.999973 | 3.246679 |
522c8e5a-6373-437f-a6c4-f2dcdf6b0a75 | Harshitha122/DSA-INTERVIEW-PREP | 1376-TimeNeededtoInformAllEmployees/1376-TimeNeededtoInformAllEmployees.cpp | vector<bool>vis(n, false);
long long int time=0;
queue<int>q;
q.push(headID);
vis[headID]=true;
while(!q.empty()){
int sz=q.size();
while(sz--){
int u=q.front();
q.pop();
time+=informTime[u];
int subTime=0;
for(au... | ALGO | 0.999699 | 4.656225 |
291f9876-16c0-42ad-9366-bd6acdb7a7c4 | Kaarti22/Solutions_DSA_CP | Contests/Codeforces_Round_1020_Div.3/D_Flower_Boy.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define vi vector<int>
#define vvi vector<vector<int>>
#define MOD 1000000007
#define pb push_back
#define popb pop_back
#define rep(i,a,b) for(int i=a; i<b; i++)
#define all(v) v.begin(),v.end()
void inparr(int arr[], int n){
for(int i=0;i<n;i++... | ALGO | 0.999983 | 3.870263 |
8f64b53a-7060-49a6-adec-99ff820b670b | irinel132/Project-Euler-Solutions | p_12/main.cpp | #include <iostream>
using namespace std;
int main() {
long n = 0;
int i = 1,
d = 0,
m_d = 500;
while (d <= m_d) {
d = 0;
n += i++;
for (int j = 1; j <= n; j++) {
if (n % j == 0)
d++;
printf("Nr: %10ld, divs: %3d\n", n, d);
}
}
printf("Number is: %ld\n", n - 1);
return 0;
}
| ALGO | 0.996574 | 4.01398 |
f35230b3-b9a1-477a-8f99-c52fadff4cda | dianyunPCL/OpenSourceCode | svo_edgelet/src/sparse_img_align.cpp | #include <algorithm>
#include <svo/sparse_img_align.h>
#include <svo/frame.h>
#include <svo/feature.h>
#include <svo/config.h>
#include <svo/point.h>
namespace svo {
SparseImgAlign::SparseImgAlign(
int max_level, int min_level, int n_iter,
Method method, bool display, bool verbose) :
display_(display)... | ALGO | 0.995424 | 6.124992 |
2f7aafcb-2d8e-4d6e-b686-92171758da55 | Sht0rmy/OS_Lab_1 | boost_1_74_0/libs/graph/example/edge_connectivity.cpp | /*
IMPORTANT!!!
~~~~~~~~~~~~
This example uses interfaces that have been deprecated and removed from
Boost.Grpah. Someone needs to update it, as it does NOT compile.
*/
#include <boost/config.hpp>
#include <set>
#include <iostream>
#include <iterator>
#include <algorithm>
#include <boost/graph/adjacency_li... | ALGO | 0.990498 | 6.641341 |
f0342403-6687-4f6a-af4a-3bb653608993 | uthidata/mbsolvesolvesolve | solver-openmp/src/solver_openmp_2lvl_os_red.cpp | #define EIGEN_DONT_PARALLELIZE
#define EIGEN_NO_MALLOC
#include <unsupported/Eigen/MatrixFunctions>
#include <common_openmp.hpp>
#include <solver_openmp_2lvl_os_red.hpp>
namespace mbsolve{
static solver_factory<solver_openmp_2lvl_os_red> factory("openmp-2lvl-os-old");
/* redundant calculation overlap */
#ifdef XEON... | ALGO | 0.997205 | 5.354033 |
8c826819-990e-4ab4-b9da-cae72eab2d99 | Bilbia/cs184-final-project-iridescence | src/pathtracer/pathtracer.cpp | #include "pathtracer.h"
#include "scene/light.h"
#include "scene/sphere.h"
#include "scene/triangle.h"
using namespace CGL::SceneObjects;
namespace CGL {
PathTracer::PathTracer() {
gridSampler = new UniformGridSampler2D();
hemisphereSampler = new UniformHemisphereSampler3D();
tm_gamma = 2.2f;
tm_level = 1.... | ALGO | 0.997545 | 6.867332 |
045167f5-faa7-4611-af8f-cc27e1cc099a | yielding/code | ruby/ffi/ffi_fibo.cpp | extern "C" {
#include <stdlib.h>
#include <math.h>
int ffi_pow(int a, int n);
int ffi_factorial(int max);
int ffi_fibonacci(int n);
}
int ffi_pow(int a, int n)
{
return pow(a, n);
}
int ffi_factorial(int max)
{
int i=max, result=1;
while (i >= 2)
{
result *= i--;
}
return result;
}
class fibonac... | ALGO | 0.998694 | 7.027711 |
382f97d0-966e-4617-a9c5-7d4fa9e9e7ce | muhammad-sayem/Phitron | Phitron/Semester 1/2. CPP For DSA/Modules/Module 03.5/6_Sorting.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n, i;
cin >> n;
int a[n+5];
for(i=0; i<n; i++){
cin >> a[i];
}
sort(a,a+n);
for(i=0; i<n; i++){
cout << a[i] << " ";
}
return 0;
} | ALGO | 0.99993 | 3.802329 |
dedd6c04-91eb-4af2-b10d-fd368861c162 | lamphanviet/competitive-programming | light-online-judge/accepted-solutions/1372 - Hexagonal Bamboo Fort.cpp | //============================================================================
// Author : LAM PHAN VIET - <EMAIL>
// Problem Name : 1372 - Hexagonal Bamboo Fort
// Time Limit : .000s
// Description :
//============================================================================
#include <algorithm>
#include... | ALGO | 0.999918 | 4.063113 |
48b7b169-5e5d-40ed-9f9c-0cf811defbee | jigyu12/Algorithm_Problem_Solve_Beakjoon | Baekjoon_C++/2754/main.cpp | #include <iostream>
using namespace std;
int main()
{
string grade;
cin >> grade;
double score = 0.0;
if (grade[0] == 'A')
{
score += 4.0;
if (grade[1] == '+')
{
score += 0.3;
}
else if (grade[1] == '-')
{
score -= 0.3;
}
}
else if (grade[0] == 'B')
{
score += 3.0;
if (grade[1] == ... | ALGO | 0.999105 | 3.775912 |
1d668a23-c1a4-4311-94f7-ed15de7c0d4d | selva1632/Data-Structure-and-algorithm | DP/198. House Robber/198. House Robber.cpp | // problem link: https://leetcode.com/problems/house-robber/
#include<iostream>
#include<vector>
#include<cstdlib>
using namespace std;
class Solution {
private:
/*
time complexity - O(N)
space complexity - O(N) + O(N)
*/
// recursion + memo
int f(int ind, vector<int>& arr, vector<int... | ALGO | 0.999943 | 5.862912 |
286c16e8-fb73-4168-aac8-2d3e8d121492 | Aakash231217/DSA-Sheet | DailyTemperatures.cpp | class Solution {
public:
vector<int> dailyTemperatures(vector<int>& temperatures) {
stack<pair<int,int>>st;
vector<int>result(temperatures.size(),0);
for(int i=0;i<temperatures.size();i++){
while(!st.empty() && temperatures[i]>st.top().first){
result[st.top().seco... | ALGO | 0.999937 | 6.310431 |
0f899962-cf5b-4826-b29f-68fe65730258 | DeathSquat/LeetCode_DSA | 123. Count Largest Group.cpp | #include <unordered_map>
using namespace std;
class Solution {
public:
int countLargestGroup(int n) {
unordered_map<int, int> groupSize;
int maxSize = 0;
for (int i = 1; i <= n; ++i) {
int sum = digitSum(i);
groupSize[sum]++;
maxSize = max(maxSize, group... | ALGO | 0.999944 | 6.781238 |
ac65d059-ad8b-469e-9a85-6a55364e9828 | NAV1RAIN/Algorithm_template | 后缀数组.cpp | #include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
using namespace std;
const int maxn = 2e4+5;
int t1[maxn], t2[maxn], c[maxn];
bool cmp(int *r, int a, int b, int l) {
return r[a] == r[b] && r[a+l] == r[b+l];
}
void da(int str[], int sa[], int Rank[], int height[], int n, int m) {
n++;
... | ALGO | 0.99993 | 3.863265 |
b2206e1b-3089-4337-8d99-3748f55e2adb | Neukz/stack-processor | StackProcessor/List.cpp | #include <iostream>
#include "List.h"
#pragma region Private methods
void List::handleNumberConstructor(List* list, int number) {
if (number <= 0) {
if (list->head == nullptr) { // 0 was passed
list->addFirst(new Node{ '0' });
}
return;
}
list->addLast(new Node{ (char... | TOOL | 0.992786 | 5.704951 |
50f5cf1a-5806-492c-ba09-d8ec9a8a587f | July-jsy/c | execrise/5.cpp | #include <iostream>
using namespace std;
class MyArray
{
private:
int *p;
int length;
public:
void input(int len)
{
cin >> len;
length = len;
p = new int(len);
for (int i = 0; i < len; i++)
{
p[i] = i;
}
}
int max()
{
int m... | ALGO | 0.984112 | 3.750449 |
eac6b939-590d-469e-8c34-5369299c0064 | rPankaj05/Leetcode_Solutions | Replace every element with the least greater element on its right - GFG/replace-every-element-with-the-least-greater-element-on-its-right.cpp | //{ Driver Code Starts
/* Driver program to test above function */
#include<bits/stdc++.h>
using namespace std;
// } Driver Code Ends
//Back-end complete function Template for C++
class Solution{
public:
vector<int> findLeastGreater(vector<int>& arr, int n) {
set<int> st;
vector<int> ans(n);
... | ALGO | 0.999904 | 6.097446 |
ff665601-1920-4e05-8507-4a66db5f7ecd | Kawser-nerd/CLCDSA | Source Codes/CodeJamData/14/01/12.cpp | #include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
#include <queue>
#include <set>
#include <map>
using namespace std;
#define ll long long
#define pii pair<int,int>
ofstream fout ("QA.out");
ifstream fin ("QA.in");
bool possible[16];
int main() {
int ... | ALGO | 0.998314 | 4.716453 |
31b76d0b-c8ab-4727-9536-bf2e15d94e3f | Zevinn/Seneca_OOP | OOP244/WS07/home/SuperHero.cpp | /**********************************************************
* Name:Min Woo Kim
* Student ID: 156417172
* Seneca email: <EMAIL>
* Section: SEE
**********************************************************/
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string.h>
#include "SuperHero.h"
using namespace st... | TOOL | 0.917121 | 3.631083 |
0cd78f88-f143-48ab-873a-e92cd5fa9527 | yalovska/Lab4_SysProg | main.cpp | #include <iostream>
#include <fstream>
#include <vector>
#include <unordered_map>
#include <set>
#include <string>
#include <algorithm>
using namespace std;
struct FiniteAutomaton {
set<char> alphabet;
set<int> states;
int start_state = 0;
set<int> final_states;
unordered_map<int, unordered_map<ch... | ALGO | 0.994422 | 6.123341 |
7eebee8e-0f37-42e3-bc61-1326860ba162 | BSkin/Rune | Rune/Bullet/src/BulletCollision/CollisionDispatch/btHashedSimplePairCache.cpp | #include "btHashedSimplePairCache.h"
#include <stdio.h>
int gOverlappingSimplePairs = 0;
int gRemoveSimplePairs =0;
int gAddedSimplePairs =0;
int gFindSimplePairs =0;
btHashedSimplePairCache::btHashedSimplePairCache():
m_blockedForChanges(false)
{
int initialAllocatedSize= 2;
m_overlappingPairArray.reserve(initia... | TOOL | 0.851563 | 5.743845 |
4b135764-c596-49a2-baef-84f907a5c3a8 | Allemeshov/Lab24Samorod | 2d/part2d.cpp | #include "part2d.h"
Sizes2d shrinkMatrix(std::string **matrix, int size);
void findSimilar(std::string **matrix, std::string elem, int i, int y, int *x, int j);
void task1_2d() {
}
void task2_2d() {
int size;
do {
std::cout << "Enter size of matrix: ";
std::cin >> size;
} while (size <=... | TOOL | 0.988836 | 4.003782 |
04c4f62d-b28a-4476-ad39-63415bab5445 | hiberabyss/LeetCode | cpp/299.bulls-and-cows.cpp | /*
* @lc app=leetcode.cn id=299 lang=cpp
*
* [299] 猜数字游戏
*
* https://leetcode.cn/problems/bulls-and-cows/description/
*
* algorithms
* Medium (57.50%)
* Total Accepted: 85.9K
* Total Submissions: 149.2K
* Testcase Example: '"1807"\n"7810"'
*
* 你在和朋友一起玩 猜数字(Bulls and Cows)游戏,该游戏规则如下:
*
* 写出一个秘密数字,并请朋... | ALGO | 0.999812 | 6.831737 |
b2ce3cd1-22c8-4d56-a29c-7f62f131ba77 | kmjp/procon | codeforce/edu/081-120/114/c.cpp | #include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define FORR2(x,y,arr) for(auto& [x,y]:arr)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define ... | ALGO | 0.999852 | 3.640575 |
9ff6cd68-834d-40cd-8654-d37ebd87dab6 | panomza/arduino | AP-12 Facelift/libraries/Byteduino/src/cosigning.cpp | #include "cosigning.h"
walletCreation newWallet;
extern bufferPackageSent bufferForPackageSent;
extern Byteduino byteduino_device;
waitingConfirmationRoom waitingConfirmationSignature;
cbSignatureToConfirm _cbSignatureToConfirm;
void setCbSignatureToConfirm(cbSignatureToConfirm cbToSet){
_cbSignatureToConfirm = cbT... | TOOL | 0.864063 | 4.984047 |
9c991687-be46-4786-a6c5-0806f26b2fe6 | NahuCF/TP1-Algoritmos | Ej7.cpp | #include <iostream>
// 7. Calcular la velocidad(metros / segundo) de los participantes de una carrera de 1500mts
// dado el tiempo en segundos en recorrerla y determinar el nombre del mas veloz. Y si el
// tiempo fuera en minutos + segundos ?
int main()
{
char masVelozNombre[50 + 1], nombreActual[50 + 1];
int segun... | ALGO | 0.974013 | 3.933583 |
8d0da4f0-cc40-4534-8015-8881f1f27e5d | ammarGamal123/Codeforces-Solutions | CodeForces/GNU C++17/1426B | Symmetric Matrix/190315957.cpp | #include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define int long long
#define lll __int128
//#define ceil(n, m) (((n) / (m)) + ((n) % (m) ? 1 : 0))
#define endl '\n'
const long long INF = 1ll << 32;
const long double PI = acos(-1);
const int ... | ALGO | 0.999944 | 4.9638 |
c2f70078-221f-44be-9076-f632511c518d | pooraniravindhiran/data_structures_and_algorithms_cpp | 0658-find-k-closest-elements/0658-find-k-closest-elements.cpp | // TC- O(nlogk)
// SC - O(k)
// class Solution {
// public:
// vector<int> findClosestElements(vector<int>& arr, int k, int x) {
// // result needs to be sorted and it should have k findClosestElements and time should be in one single pass - so priority queue is a good data structure here
// // mi... | ALGO | 0.999998 | 5.661043 |
99480c1e-4207-4610-9f58-5ab6f6df95aa | RDCH106/n64oid | video-rice/src/DecodedMux.cpp | #include <algorithm>
#include "GeneralCombiner.h"
#include "Combiner.h"
#include "Config.h"
#include "RenderBase.h"
#define ALLOW_USE_TEXTURE_FOR_CONSTANTS
static const uint8 sc_Mux32[32] =
{
MUX_COMBINED, MUX_TEXEL0, MUX_TEXEL1, MUX_PRIM,
MUX_SHADE, MUX_ENV, MUX_1, MUX_COMBINED|MUX_ALPHAREPL... | TOOL | 0.859551 | 4.694462 |
b4074c1e-28b5-4e28-bc34-b113af8b91f6 | saphmitchy/deliair-lib | verify/weighted_uf.test.cpp | #define PROBLEM "https://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=DSL_1_B"
#include "../src/Weighted_uf.hpp"
int main() {
int n, q; cin >> n >> q;
Weighted_uf<int> uf(n);
rep(i,q) {
int id; cin >> id;
if(id == 0) {
int x, y, z; cin >> x >> y >> z;
uf.unite(... | ALGO | 0.999945 | 4.644435 |
a9072b01-8369-47d3-aec1-59d5b7130c29 | mdurasevic/electoral_systems_combination | crp/crp/UnrestrictedAutomaticHeuristicAllCombinationsTwoTrees.cpp | #include "UnrestrictedAutomaticHeuristicAllCombinationsTwoTrees.h"
UnrestrictedAutomaticHeuristicAllCombinationsTwoTrees::UnrestrictedAutomaticHeuristicAllCombinationsTwoTrees(
std::string expression1, std::string expression2, int prelocations) :evaluator1(terminals), evaluator2(terminals)
{
this->prelocations = pre... | ALGO | 0.999244 | 4.417579 |
002e852e-7946-41dc-a3a8-cb3d4e084c4f | FarmerJohnLYH/shareOI | JZOJ/2019.1.28/5725.cpp | #include <cstdio>
#include <cstring>
#include <queue>
#include <iostream>
#include <algorithm>
#define oo 2139062143
#define fo(i,x,y) for (int i=(x);i<=(y);++i)
#define sqr(x) ((x)*(x))
#define fi first
#define se second
using namespace std;
typedef pair<int,int> PI;
const int N=440,M=N*N;
int n,m;
int x[N],y[N];
int... | ALGO | 0.999853 | 3.620695 |
cc50164b-d653-430a-90b9-ac14a203090e | mohannagabhiru/DSA | Stacks/validParanthesis.cpp | #include <iostream>
#include <stack>
using namespace std;
bool ValidParanthesis(string target,int length){
stack<char> s1;
for(int i=0;i < length;i++){
cout << target[i] << endl;
if(target[i] == '(' || target[i] == '[' || target[i] == '{'){
s1.push(target[i]);
}else{
... | ALGO | 0.992363 | 4.931097 |
428107e2-a46a-4791-bacc-c6fa92669e27 | ghorn/debian-coinor-ipopt | Ipopt/src/Algorithm/IpUserScaling.cpp | #include "IpUserScaling.hpp"
namespace Ipopt
{
void UserScaling::DetermineScalingParametersImpl(
const SmartPtr<const VectorSpace> x_space,
const SmartPtr<const VectorSpace> c_space,
const SmartPtr<const VectorSpace> d_space,
const SmartPtr<const MatrixSpace> jac_c_space,
const SmartPtr<const Ma... | TOOL | 0.982499 | 6.501575 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.