uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
fc28547e-8145-4362-9fdc-cb64a2b59cd9 | ishandutta2007/codeforces | sevenkplus/normal/34/C.cpp | #include<cstdio>
#include<algorithm>
using namespace std;
#define N 110
int n,a[N];
int main()
{
for(int x;scanf("%d",&x)!=EOF;getchar())a[n++]=x;
sort(a,a+n),n=unique(a,a+n)-a;
for(int i=0,j;i<n;i=j)
{
for(j=i+1;j<n&&a[j]-a[j-1]==1;j++);
if(j==i+1)printf("%d",a[j-1]);else printf("%d-%d"... | ALGO | 0.99975 | 3.478969 |
a1705f26-0419-4c47-b3f5-ffea8e886184 | XessX/Angry_Bird_Alike | boost/libs/compute/example/monte_carlo.cpp | #include <iostream>
#include <boost/compute/function.hpp>
#include <boost/compute/system.hpp>
#include <boost/compute/algorithm/count_if.hpp>
#include <boost/compute/container/vector.hpp>
#include <boost/compute/iterator/buffer_iterator.hpp>
#include <boost/compute/random/default_random_engine.hpp>
#include <boost/com... | ALGO | 0.997226 | 6.947901 |
b1d24854-3d46-456f-93d3-ffdb3530c474 | ishandutta2007/codeforces | rebelz/normal/1250/M.cpp | #include<bits/stdc++.h>
#define y1 dmytxdy
#define fi first
#define se second
#define mp make_pair
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef long double ld;
template <typename T> bool chkmin(T &x,T y){return x>y?x=y,1:0;}
t... | ALGO | 0.999982 | 3.716176 |
abb4a3b8-5f82-4ede-8f1f-c3be7029829c | semenInRussia/cf | olproger/2025/dt4/a.cpp | // semenInRussia 2025
#include <algorithm>
#include <cstdint>
#include <iostream>
#include <vector>
using namespace std;
const int N = 2e5 + 100;
int a[N];
int main() {
int n;
cin >> n;
string s;
cin >> s;
for (int i = 0; i < n; i++) {
cin >> a[i];
}
int r = 0;
for (int i = 0; i < n; i++) {
... | ALGO | 0.999469 | 3.746567 |
acd20134-089d-4641-9509-a715bc13fc19 | alpha37283/DSA | LeetCode/ransomNote.cpp | class Solution
{
public:
bool canConstruct(string ransomNote, string magazine)
{
unordered_map<char, int> countChar;
int count;
for (int i = 0; i < magazine.size(); i++)
{
if (countChar.find(magazine[i]) != countChar.end())
{
countChar[mag... | ALGO | 0.999779 | 6.226792 |
78380b13-16f1-4889-ac7d-56f6e1487e01 | SI-Abid/Hello-world | Codeforces/1469a.cpp | #include "bits/stdc++.h"
#define vi vector<int>
#define pb push_back
using namespace std;
int main()
{
// freopen("in.txt", "r", stdin);
int t;
for(cin>>t;t;t--)
{
string s;
cin>>s;
if(s.size()%2==0 && s[0]!=')' && s[s.size()-1]!='(')
cout<<"YES\n";
else
... | ALGO | 0.998989 | 3.750341 |
7b285aa2-48b6-42e8-813d-8b22cda6425e | apkmew/Code | POSN Gen 16/Camp 1.2/EOIC #56/12 - DownRightScore.cpp | /*
TASK: Down Right Score
LANG: CPP
AUTHOR: Mew
SCHOOL: RYW
*/
#include<bits/stdc++.h>
using namespace std;
int a[300][300],n,m,ma=-1;
void play(int i,int j,int now){
now += a[i][j];
if(i==n-1 && j==m-1){
ma = max(now,ma);
return ;
}
if(i+1<n) play(i+1,j,now);
if(j+1<... | ALGO | 0.999938 | 4.317983 |
e52d50c7-48a8-4ac0-9e0c-3af58d024f14 | ishandutta2007/codeforces | rui_er/normal/1592/C.cpp | //By: Luogu@rui_er(122461)
#include <bits/stdc++.h>
#define rep(x,y,z) for(ll x=y;x<=z;x++)
#define per(x,y,z) for(ll x=y;x>=z;x--)
#define debug printf("Running %s on line %d...\n",__FUNCTION__,__LINE__)
using namespace std;
typedef long long ll;
const ll N = 1e5+5;
ll T, n, k, a[N], fa[N], dis[N], s[N];
vector<ll> ... | ALGO | 0.999972 | 4.137006 |
82c3d470-e773-4d19-9078-b0eba22e0b9d | Manju567/coding_Leetcode-solutions | solution/2500-2599/2555.Maximize Win From Two Segments/Solution.cpp | class Solution {
public:
int maximizeWin(vector<int>& prizePositions, int k) {
int n = prizePositions.size();
vector<int> f(n + 1);
int ans = 0;
for (int i = 1; i <= n; ++i) {
int x = prizePositions[i - 1];
int j = lower_bound(prizePositions.begin(), prizePosi... | ALGO | 0.999968 | 5.405985 |
59c359f7-85c9-461a-b1a3-99f31aa733eb | surge-synthesizer/surge | libs/airwindows/src/AirProc.cpp | #ifndef __Air_H
#include "Air.h"
#endif
namespace Air {
void Air::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrames)
{
float* in1 = inputs[0];
float* in2 = inputs[1];
float* out1 = outputs[0];
float* out2 = outputs[1];
double hiIntensity = -pow(((A*2.0)-1.0),3)*2;
double ... | ALGO | 0.99892 | 4.07034 |
760131ad-a0a7-4783-9830-fee06400ab36 | PerfectLifeG/Algorithm-Competition | Nowcoder/2024寒假1/f.cpp | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define all(x) x.begin(),x.end()
#define no cout<<"No"<<endl
#define yes cout<<"Yes"<<endl
#define endl '\n'
// #define x first
// #define y second
typedef pair<int,int> PII;
const int N=200010;
const int mod=1e9+7;
const int INF=0x3f3f3f3f;
int ksm(int... | ALGO | 0.999991 | 4.704984 |
48d6f97f-1abb-43f0-bc9f-7bf6527c4b73 | yoo-lee/cpp | cpp09/ex02/sortList.cpp | #include <iostream>
#include <list>
void merge(std::list<int>& A, int l, int mid, int r) {
std::list<int> left(std::next(A.begin(), l), std::next(A.begin(), mid + 1));
std::list<int> right(std::next(A.begin(), mid + 1), std::next(A.begin(), r + 1));
std::list<int>::iterator it1 = left.begin();
std... | ALGO | 0.999947 | 5.42965 |
403e968b-2409-4bd1-b03a-b369e18150f2 | sdi1400258/System-Programming | SysPro3/datevacc.cpp | #include <iostream>
#include <cstdlib>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "datevacc.h"
using namespace std;
void datevacc_test() {
string dv, dt;
cout << "Type date of vaccination (DD-MM-YYYY) " << endl;
cin >> dv;
cout << "Type date of traveling (DD-MM-YYYY) " << e... | ALGO | 0.990229 | 4.650384 |
03ad26c6-6f4c-4d6c-a1fb-14721bdd68de | manup75/ads | binary.cpp | #include<iostream>
#include<queue>
using namespace std;
class node
{
public:
int data;
node*left;
node*right;
node(int d)
{
this->data=d;
this->left=NULL;
this->right=NULL;
}
};
node* buildTree(node* root)
{
cout<<"enter the data";
... | ALGO | 0.999564 | 4.17348 |
471de89d-b08a-4f20-b99a-f75cd5a151df | harshbhar0629/cppRepository | cpp/Algo_Dsa_Sheet/Heaps/min_fuel_tank_req_to_reach_dest.cpp | #include <bits/stdc++.h>
using namespace std;
// https://leetcode.com/problems/minimum-number-of-refueling-stops/
class Solution
{
public:
int minRefuelStops(int target, int startFuel, vector<vector<int>> &stations)
{
int max_reach = startFuel;
int n = stations.size();
priority_queue<in... | ALGO | 0.999718 | 5.531428 |
a73ac576-aab2-44b9-86b0-3d60e356d18b | stevenzabala/P-Basica-1 | CodigosPBasica-master/Guia14/cuatro.cpp |
#include <iostream>
using namespace std;
const string enunciado = "Este programa imprime la sucesion de fibonacci desde \
1 hasta N, \nsiendo este ultimo un numero ingresado por el usuario\n";
int fibonacci(int n){
int valor;
if (n==0 || n==1){
return n;
}
else{
return fibonacci(n-1)+fibonacci(n-2);
... | ALGO | 0.999298 | 3.960515 |
c507dedf-99e6-47b8-94e5-3b26a22e6738 | ishandutta2007/codeforces | bigbag/normal/570/D.cpp | #include <map>
#include <set>
#include <stack>
#include <cmath>
#include <queue>
#include <vector>
#include <cstdio>
#include <string>
#include <cstring>
#include <cstdlib>
#include <iostream>
#include <algorithm>
using namespace std;
const int max_n = 500055, inf = 1111111111;
int n;
char s[max_n];
vector<int> q;
i... | ALGO | 0.999992 | 3.653132 |
fa152cba-8f7d-4597-8518-4fae0d8cacce | kednzije/String109 | ProgrammingHomework/DataStructure/20210923/B.cpp | #include <iostream>
using namespace std;
constexpr int MAXN = 1e4 + 10;
int sta[MAXN], stasz;
int main() {
int n;
cin >> n;
stasz = 0;
for(int i = 1; i <= n; i++) {
int x;
cin >> x;
if(0 == stasz) {
sta[++stasz] = x;
continue;
}
while(stasz != 0) {
if(sta[stasz] * x > 0 || x > 0) {
sta[++s... | ALGO | 0.999993 | 3.880502 |
a658e7cd-0edc-4241-b33a-d646b4f5fdf1 | ngthanhtrung23/CompetitiveProgramming | codeforces/1302/B.cpp | #include<bits/stdc++.h>
#define DEBUG(X) { auto _X = (X); std::cerr << "L" << __LINE__ << ": " << #X << " = " << (_X) << std::endl; }
#define PR(A, n) { std::cerr << "L" << __LINE__ << ": " << #A << " = "; for(size_t i = 1, _n = n; i <= _n; i++) std::cerr << A[i] << ' '; std::cerr << std::endl; }
#define PR0(A, n) { st... | ALGO | 0.999837 | 4.780592 |
ca56738d-79c4-4824-a460-4c4434a1cd13 | haoliumilan/Agumon | frameworks/cocos2d-x/cocos/base/ccUtils.cpp | #include "base/ccUtils.h"
#include <cmath>
#include <stdlib.h>
#include "base/CCDirector.h"
#include "base/CCAsyncTaskPool.h"
#include "base/CCEventDispatcher.h"
#include "base/base64.h"
#include "renderer/CCCustomCommand.h"
#include "renderer/CCRenderer.h"
#include "renderer/CCTextureCache.h"
#include "platform/CCI... | TOOL | 0.924231 | 6.056654 |
51444fcc-f81c-4c05-8b73-23e546d2a405 | NaVIn69/AlgoZenith_DSA | graph2/revision/bfs01.cpp | // here we use the deque
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define endl "\n"
int n,m;
// here have the graph with weight of edge
vector<vector<pair<int,int>>>g;
vector<int>dis,vis;
void sssp(int sc_node){
vis.assign(n+1,0);
dis.assign(n+1,1e9);
deque<int>dq;
dq.push_back(s... | ALGO | 0.999946 | 5.014459 |
299574fa-3c35-4904-b179-ad2fff37e7d4 | raincross7/code-similarity | codes/train_code/problem098/problem098_66.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const double pi = acos(-1);
#define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
#define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define __GET_MACRO3(_1, _2, _... | ALGO | 0.999802 | 4.536397 |
94fbe3c2-7370-49bb-9bb7-131d7398a52a | danieltrt/SBFL | benchmarks/python_syntax/EQUILIBRIUM_INDEX_OF_AN_ARRAY.cpp | #include <iostream>
#include <cstdlib>
#include <string>
#include <vector>
#include <fstream>
#include <iomanip>
#include <cstdlib>
#include <string>
#include <vector>
#include <queue>
#include <fstream>
#include <iomanip>
#include <vector>
#include <queue>
#include <map>
#include <unordered_map>
#include <set>
#incl... | ALGO | 0.999855 | 6.014798 |
2af42f33-ed0e-428d-8474-382e623da6f3 | tbielak/AoC_cpp | sources/2019/2019_12.cpp | #include "2019_12.h"
namespace Day12_2019
{
Point3D::Point3D()
: x(0), y(0), z(0)
{
}
Point3D::Point3D(int x, int y, int z)
: x(x), y(y), z(z)
{
}
Point3D& Point3D::operator += (const Point3D& rhs)
{
x += rhs.x;
y += rhs.y;
z += rhs.z;
return *this;
}
Point3D Point3D::operator - (const Point3D& ... | ALGO | 0.999231 | 5.080815 |
e9e7e180-b80b-4152-b441-08bd0f4daf25 | yosupo06/library-checker-problems | convolution/bitwise_and_convolution/verifier.cpp | #include "params.h"
#include "testlib.h"
int main() {
registerValidation();
const int n = 1 << inf.readInt(0, N_MAX);
inf.readChar('\n');
for (int t = 0; t != 2; ++t) {
for (int i = 0; i != n; i += 1) {
inf.readInt(0, MOD - 1);
if (i + 1 != n) {
inf.readSpace();
} else {
... | TEST | 0.858592 | 3.511482 |
7418677e-a07a-490d-b0b4-16245ff27d99 | ThatOneTallKid/Leetcode | 733-flood-fill/733-flood-fill.cpp | class Solution {
public:
vector<vector<int>> floodFill(vector<vector<int>>& image, int sr, int sc, int newColor) {
if(image[sr][sc] != newColor)
dfs(image, sr, sc, image[sr][sc], newColor);
return image;
}
void dfs(vector<vector<int >> &image, int i, int j, int c0, ... | ALGO | 0.98984 | 6.416439 |
92e5a365-ba80-4a8b-8845-52fd51484d15 | sagarmittal1/LeetCode | 680-valid-palindrome-ii/680-valid-palindrome-ii.cpp | class Solution {
public:
bool isPalin(string s, int x, int y) {
int l = x, r = y;
while(l < r) {
if(s[l] != s[r]) return false;
l++; r--;
}
return true;
}
bool validPalindrome(string s) {
int l = 0, r = s.size()-1;
while(l... | ALGO | 0.999984 | 6.390027 |
bad695b1-d6a7-4144-9363-ba242922fc00 | daman94/Coding-Problems | Trees/Binary Trees/24-Zigzag Traversal.cpp | #include <iostream>
#include <queue>
#include <stack>
using namespace std;
struct BTNode {
int data;
struct BTNode* left;
struct BTNode* right;
};
struct BTNode* newNode(int data)
{
struct BTNode* newnode = new struct BTNode;
newnode->data = data;
newnode->left = NULL;
newnode->right ... | ALGO | 0.999982 | 4.810809 |
cbd35525-9c7c-40a0-b4a7-755bd2f8a35e | StackDoubleFlow/LLVMStackPU | libcxx/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval_param.pass.cpp | // <random>
// template<class RealType = double>
// class student_t_distribution
// template<class _URNG> result_type operator()(_URNG& g, const param_type& parm);
#include <random>
#include <cassert>
#include <vector>
#include <numeric>
#include "test_macros.h"
template <class T>
inline
T
sqr(T x)
{
return x ... | TEST | 0.879004 | 4.990874 |
1dc136cc-fc80-43b8-835f-a0fee8ae1077 | alexandraback/datacollection | solutions_5688567749672960_1/C++/zhanyl/a.cpp | #include <vector>
#include <list>
#include <queue>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cst... | ALGO | 0.999504 | 4.117884 |
28dbba42-eb6e-4e88-9b04-7f9cd5a69790 | PrernaSingh587/Leetcode-questions | 1490-clone-n-ary-tree/1490-clone-n-ary-tree.cpp | Node *solve(Node *root) {
if(!root) return NULL;
Node *r = new Node(root->val);
for(int i=0;i<root->children.size();i++) {
r->children.push_back(solve(root->children[i]));
}
return r;
}
class Solution {
public:
Node* cloneTree(Node* root) {
return solve(root);
}
}; | ALGO | 0.999924 | 5.786528 |
b394d67d-dfa4-4fb1-b20d-9e83fe026bd2 | naimurnemu/Problems_solved_with_cpp | LinkedList/Delete_Node_at_Linked_List.cpp | #include <bits/stdc++.h>
using namespace std;
class Node
{
public:
int value;
Node *next;
Node(int value)
{
this->value = value;
this->next = NULL;
}
};
void insert_item(Node *&head, Node *&tail, int val)
{
Node *newNode = new Node(val);
if (head == NULL)
{
head = newNode;
tail = newNo... | ALGO | 0.999355 | 5.078886 |
fa495c80-0135-4ffc-a0c8-8028ff969d0e | teseoch/CG-Spring-2022 | ext/eigen/bench/spbench/sp_solver.cpp | // Small bench routine for Eigen available in Eigen
// (C) Desire NUENTSA WAKAM, INRIA
#include <iostream>
#include <fstream>
#include <iomanip>
#include <Eigen/Jacobi>
#include <Eigen/Householder>
#include <Eigen/IterativeLinearSolvers>
#include <Eigen/LU>
#include <unsupported/Eigen/SparseExtra>
//#include <Eigen/Sp... | ALGO | 0.994726 | 4.316308 |
a7d3a3c2-4247-4a4e-8bc1-d8e17dab079e | annh9b/JPEGView-Static | JPEGView/KeyMap.cpp | #include "StdAfx.h"
#include "KeyMap.h"
#include "NLS.h"
#include "resource.h"
#include "Helpers.h"
#include "SettingsProvider.h"
#define M_SHIFT 0x10000
#define M_ALT 0x20000
#define M_CTRL 0x40000
// KeyMap filename constants
static const TCHAR* KEYMAP_USER_FILE_NAME = _T("KeyMap.txt");
static const TCHAR* KEYMA... | TOOL | 0.871288 | 6.503316 |
8039c4a9-3540-4f85-ae64-2ca950fc0208 | sunbines/log | boost/libs/polygon/benchmark/voronoi_benchmark.cpp | // Boost.Polygon library voronoi_benchmark.cpp file
// See http://www.boost.org for updates, documentation, and revision history.
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <fstream>
#include <list>
#include <numeric>
#include <vector>
#define BOOST_TEST_MODULE benchmark_test
#include <boos... | TEST | 0.93263 | 7.067715 |
a770a49d-443c-46cc-90be-8a6c317d872a | ugozapad/xray_ol | TestBed/DitherBW/DitherBW.cpp | // DitherBW.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "tga.h"
static int magic4x4[4][4] =
{
0, 14, 3, 13,
11, 5, 8, 6,
12, 2, 15, 1,
7, 9, 4, 10
};
void bwdithermap (int levels, int magic[16][16] )
{
/* Get size of each step */
float N = 255.0f /... | ALGO | 0.988244 | 4.647781 |
e378c004-dbd2-4d11-b2ab-3369c28d8a13 | pavix0xd/EleEye | mobile-frontend/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.998217 | 6.776823 |
4590aff9-e92b-4a2b-9af3-efd7d2fdb4ea | lihzxs/LouGuOJCode | cpp/P1881.cpp | /////////////////////////////////////////////
//
// FileName : First.cpp
// Creator : Fm
// Date : 2019-10-12 21:19
// Comment : OJ(P1881)
//
///////////////////////////////////////////
//#include "pch.h"
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <math.h>
#include <st... | ALGO | 0.999935 | 3.155158 |
83398aad-d22f-4457-a76e-ad17f0cc3cfb | ldcduc/leetcode-training | cpp/combination-sum-ii.cpp | /* Problem url: https://leetcode.com/problems/combination-sum-ii
* Code by: ldcduc
* */
/* Begin of Solution */
class Solution {
public:
set<vector<int>> setResult;
void recursion(int index, vector<int>& candidates, vector<int> &tmp, int remain) {
if (remain <= 0) {
if (remain == 0) {
... | ALGO | 0.999973 | 6.469443 |
d203ae39-9f0a-41a3-b0ed-3aba314d9a2d | cjlworld/OJ | Luogu/P1486.cpp | #include<ctime>
#include<cstdio>
#include<cstdlib>
#include<iostream>
#include<algorithm>
#define LL long long
using namespace std;
const int N=1e5+5;
struct node
{
int lc,rc;
int val; //
int pri;
int size;
int tag;
#define lc(x) t[x].lc
#define rc(x) t[x].rc
#define v(x) t[x].val
#define p(x) t[x].pri
#defi... | ALGO | 0.998146 | 3.384627 |
da2687a7-aba5-4b87-8c1f-de66ac45af02 | ishandutta2007/codeforces | hellkitsune/normal/552/B.cpp | #include <cstdio>
#include <cmath>
#include <cstring>
#include <string>
#include <sstream>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <map>
#include <set>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <cassert>
using namespace std;
#define pb push_back
#define ... | ALGO | 0.999821 | 3.68259 |
6f336d30-2ab2-4412-bb8e-10ec7a7aa201 | ishandutta2007/codeforces | natsugiri/normal/1493/C.cpp | #pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
#include<stdio.h>
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<string.h>
#ifdef LOCAL
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#else
#define NDEBUG
#define eprintf(...) do {} while (0)
#endif
#include<cassert>
using ... | ALGO | 0.999775 | 3.250855 |
efc76410-ada7-4071-aa10-4f13342522ff | atharvkhardekar/LeetCode-Daily-Challenge | Array/DP/(May 5)_Domino_and_Tromino_Tiling.cpp | // LeetCode Problem No. 790
// Daily Challenge - 05/05/2025
class Solution {
public:
int numTilings(int n) {
const int MOD = 1e9 + 7;
vector<long long> dp(n + 1);
dp[0] = 1;
if (n >= 1) dp[1] = 1;
if (n >= 2) dp[2] = 2;
lo... | ALGO | 0.999976 | 6.69596 |
7928bfbb-63f6-4ffe-bcbf-ee1660c0738f | Sahil-pillania/Data_Structures | Recursion/recursion in string/replace.cpp | #include <iostream>
using namespace std;
// replace pi with 3.14 in string
void replacePi(string s)
{
if (s.length() == 0) // base case
{
return;
}
if (s[0] == 'p' && s[1] == 'i')
{
cout << "3.14";
replacePi(s.substr(2));
}
else
{
cout << s[0];
... | ALGO | 0.999839 | 4.304471 |
a0bd7d5b-095e-49eb-b298-637bc5324d6f | manikanta2901/ubuntu | .history/codingChallenges/cpp/Codechef/DSA/LinearDataStructures/compilersAndParsers_20200728172239.cpp | #include<bits/stdc++.h>
using namespace std;
int main(){
int t;
cin >> t;
while(t--){
string str;
cin >> str;
if(str[0] == '>'){
cout << 0 << endl;
continue;
}
int longest_index = 0,count = 0;
stack<char> tag;
bool flag;
for(int i = 0; i < str.size();i++){
if(str[i] == '<' ){
tag.push... | ALGO | 0.999576 | 3.14702 |
0ca47b90-ba10-479d-a0fa-f4afcfa2d25b | umar-07/Competitive-Programming-questions-with-solutions | CATFEED/main.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t;
while(t--)
{
int n, m;
int flag=0;
cin >> n >> m;
int arr[m];
vector <int> v;
v.clear();
vector <int> :: iterator itr;
for(int i=0; i<m; i++)
cin >> a... | ALGO | 0.999902 | 3.63667 |
551210b6-b2d0-4557-9cc4-bc4b691a2251 | trantuananh-123/CTDL-GT | TinhGiaTriBTHauTo(DSA07013).cpp | #include<iostream>
#include<stack>
#include<cstring>
#include<sstream>
using namespace std;
int main() {
int t;
cin >> t;
while(t--) {
string s;
cin >> s;
stack<string> st;
int sum = 0, a, b;
for(int i = 0; i < s.size(); i++) {
if(s[i] == '+' || s[i] == ... | ALGO | 0.999591 | 4.156303 |
8983960a-1de4-4828-8300-f8a4774adb5c | osirisQdt2810/algorithms | src/leetcode/cheatsheet/solution/1200-1299/1213.Intersection of Three Sorted Arrays/Solution2.cpp | class Solution {
public:
vector<int> arraysIntersection(vector<int>& arr1, vector<int>& arr2, vector<int>& arr3) {
vector<int> ans;
for (int x : arr1) {
auto i = lower_bound(arr2.begin(), arr2.end(), x);
auto j = lower_bound(arr3.begin(), arr3.end(), x);
if (*i ==... | ALGO | 0.999964 | 5.799543 |
1f2d9363-80fa-4685-bbce-70805dcbadde | bagaspt/meal_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.9988 | 6.76073 |
4307bb51-50fa-4b49-948f-08fa7e73f6cd | CitadelLan/MiniSQL | src/executor/index_scan_executor.cpp | #include "executor/executors/index_scan_executor.h"
#include <queue>
#include "planner/expressions/constant_value_expression.h"
#include <algorithm>
/* 对一个UpdateExecutor,有:
** ExecuteContext: CatalogManager + BufferPoolManager
** IndexScanPlanNode: output_schema + table_name + indexes(实际上只有单个索引) +
* ... | ALGO | 0.968495 | 4.022814 |
ae04587e-0c38-409b-9482-55d6d6402e40 | 113bommy/deepmind_codecontests_refine | cpp_source_filter_file/cpp_train_7847_6.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int a, b, c;
cin >> a >> b >> c;
if (a > b) swap(a, b);
if (b >= c) {
cout << 0;
return 0;
}
if (a <= 0 && b <= 0) {
cout << -1;
return 0;
}
long long int t = 0;
if (a < 0) {
long long int dif = (b - a) / b - 1;
... | ALGO | 0.99993 | 4.079209 |
4d53537d-7f74-425f-a0e2-1c9719b2a73f | ishandutta2007/codeforces | renjingyi/normal/1096/F.cpp | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <algorithm>
#include <map>
#include <set>
#include <bitset>
#include <vector>
#include <complex>
#include <queue>
#include <stack>
#include <sstream>
using namespace std;
const long long mod = 99824435... | ALGO | 0.999985 | 3.990682 |
938a4ee8-55ec-42cf-9e23-2bb0d8fc9c0e | PauloRobertoPC/Library | Contests/SPOJ/Game Theory/ADAGAME.cpp | #include <bits/stdc++.h>
using namespace std;
int x, k;
string s;
int dp[10001][101], pot[4];
int get_next(int num, int d){
int digit = (num/pot[d])%10;
return (digit == 9 ? num-9*pot[d] : num+pot[d]);
}
int solve(int num, int op){
if(op == k+1) return (num > x);
int &val = dp[num][op];
if(val ... | ALGO | 0.999987 | 6.24606 |
35cf9e5a-cd3e-47bd-9320-6b1823eb1be6 | hao-xx/usaco | finish/crypt1.cpp | /*
ID: hxx02021
PROG: crypt1
LANG: C++
*/
#include <iostream>
#include <fstream>
using namespace std;
//检查n是否由digits[]中数字组成。N为digitis[]数组中元素个数
bool check(int n, int *digits, int N){
int number=n, d=0;
int check=0;
while(number){
d=number%10;
number/=10;
for(int i=0; i<N; i++){
if(digits[i]==d){check=1;bre... | ALGO | 0.999827 | 4.362009 |
1dff5826-92f0-495f-a221-f9bbda765491 | akpaswan67/hackoctober | Data Structures/Priority queues/kthLrge.cpp | /*Given an array A of random integers and an integer k, find and return the kth largest element in the array.
Try to do this question in less than O(nlogn) time.
Input Format :
Line 1 : An integer N i.e. size of the array
Line 2 : N integers which are elements of the array, separated by spaces
Line 3 : An integer k
Out... | ALGO | 0.999756 | 4.18069 |
6942535c-663f-4fdc-95a2-f0d275549441 | VivekKumarMishra1301/Codechef-Problems | podium_finish.cpp | #include <iostream>
using namespace std;
int main()
{
// your code goes here
int t;
cin >> t;
while (t--)
{
int a, b;
cin >> a >> b;
cout << a + b << endl;
}
return 0;
}
| ALGO | 0.999256 | 5.61587 |
ea979c4d-98aa-47f8-9475-39e9c71486b5 | blueagle-so/stuff | fema.cpp | #include <iostream>
int main(){
int p=7;
int a=4;
for(int pi=0;pi<p;pi++)
std::cout<< a*pi%p <<std::endl;
return 0;
}
| ALGO | 0.998286 | 3.262184 |
eb72ea82-87c4-48b9-8182-8a50354c15d9 | lucasdbr05/competitive-programming | fase_2/ao.cpp | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define int long long int
#define sws ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);
typedef pair <int, int> pii;
// typedef long long int ll;
const int MAX= 1e2;
const int INF= 0x3f3f3f3f;
vector<pii> dirs = {{1, 0}, {-1, 0}, {0, 1}, {0,... | ALGO | 0.999969 | 4.143726 |
bcdc09ce-e1ff-4955-96d4-b48f1a6caed8 | kunyavskiy/competitive-programming-archive | YandexCup/2013/round2/C.cpp | //#include <iostream>
#include <fstream>
#include <vector>
#include <set>
#include <map>
#include <cstring>
#include <string>
#include <cmath>
#include <cassert>
#include <ctime>
#include <algorithm>
#include <sstream>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <cstdlib>
#include <cstdi... | ALGO | 0.996963 | 3.710109 |
4f986a55-7f58-42ff-850d-19f6cc566b69 | Ziaeemehr/cpp_workshop | stroustrup/chapter20/chapter20_ex11.cpp | // Chapter 20, Exercise 11: Given a list<int> as a by-reference parameter, make
// a vector<double> and copy the elements of the list into it. Verify that the
// copy was complete and correct, then print the elements in order of increasing
// value.
#include "../lib_files/std_lib_facilities.h"
template<class Iter>
vo... | ALGO | 0.989444 | 4.831147 |
b526fee3-1fd4-428a-a605-d1e7676d8889 | ShrutiPotadar-02/30-Days-of-LeetCode | Arrays/arr.cpp | #include<bits/stdc++.h>
#include<iostream>
using namespace std;
int main() {
int n;
cin >> n;
int arr[10000];
for (int i = 0; i < n; i++) {
cin >> arr[i];
}
for (int i = 0; i < n; i++) {
if (arr[i] % 2 != 0) {
swap(arr[i], arr[n - i]);
}
}
for (int i = 0; i < n; i++) {
cout << arr... | ALGO | 0.999843 | 4.449653 |
5c8010fe-81c0-4d59-ae60-1af535a646b1 | leonardoAnjos16/Competitive-Programming | Other/winning_cells.cpp | #include <bits/stdc++.h>
using namespace std;
#define long long long int
#define pii pair<int, int>
#define pll pair<long, long>
#define fst first
#define snd second
#define all(ds) (ds).begin(), (ds).end()
#define rall(ds) (ds).rbegin(), (ds).rend()
#define size(ds) (int) (ds).size()
#define pq priority_queue
#de... | ALGO | 0.9999 | 4.27952 |
52926e9f-04df-44c2-a796-00581639f04c | alifalhasan/CP-code-vault | Codeforces/Codeforces Round/Codeforces Round 762 (Div. 3)/F - Let's Play the Hat-/140150437.cpp | #include<bits/stdc++.h>
#include<ext/pb_ds/tree_policy.hpp>
#include<ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ll long long
template<typename temp>using ordered_set = tree<temp, null_type, less<temp>, rb_tree_tag,tree_order_statistics_node_update>;
//order_of_key(k) : Numb... | ALGO | 0.999773 | 3.305859 |
73d34125-44ac-4ef5-b18f-8780b5d327d3 | restless226/Data-Structures-and-Algorithms | untitled/DSA/SLIDING_WINDOW/FSSW/max_of_all_subarrays_of_size_k.cpp | /*
Maximum of all subarrays of size K | Sliding Window
PROBLEM STATEMENT:
Given an array arr[] of size N and an integer K.
Find the maximum for each and every contiguous subarray of size K.
*/
#include <bits/stdc++.h>
#define int long long
using namespace std;
vector<int> max_of_all_subarray_3(int arr[], int n, int ... | ALGO | 0.999663 | 4.754049 |
8030ae7f-8fb2-477c-9bda-a0906d916275 | davideberly/GeometricTools | GTE/MathematicsGPU/GPUFluid3UpdateState.cpp | #include <MathematicsGPU/GTMathematicsGPUPCH.h>
#include <MathematicsGPU/GPUFluid3UpdateState.h>
using namespace gte;
GPUFluid3UpdateState::GPUFluid3UpdateState(
std::shared_ptr<ProgramFactory> const& factory,
int32_t xSize, int32_t ySize, int32_t zSize, int32_t numXThreads, int32_t numYThreads, int32_t numZTh... | TOOL | 0.917705 | 7.279604 |
db1f69cf-e0ae-4685-9b80-6f3933d59e6f | ahmedalaa14/Leetcode | 1004-Max-Consecutive-Ones-III.cpp | class Solution {
public:
int longestOnes(vector<int>& nums, int k) {
int i = 0 , j =0 ;
while (j < nums.size()){
if (nums[j]==0){
k--;
}
if (k<0){
if (nums[i]==0){
k++;
}
i++;
... | ALGO | 0.999973 | 6.019181 |
350f2823-ecf7-48f8-9e14-b23094a8ec57 | wide-world/algorithm-samsungelectronics | 3_그리디&완전탐색&DP/쉬운거스름돈.cpp | #include <iostream>
using namespace std;
int charge[8] = {50000, 10000, 5000, 1000, 500, 100, 50, 10};
int cnt[8];
void solve(int N)
{
for (int i = 0; i < 8; i++) {
if (N >= charge[i]) {
cnt[i] = (N / charge[i]);
N %= charge[i];
}
}
for (int i = 0; i < 8; i++)
... | ALGO | 0.998081 | 3.724782 |
5a792f93-4df3-4741-a611-6f494a4f0acd | as3545/GFG-DSA-Questions | Find the fine.cpp | /*
Given an array of penalties fine[], an array of car numbers car[], and also the date. The task is to find the total fine which will be collected on the given date. Fine is collected from odd-numbered cars on even dates and vice versa.
Example 1:
Input:
N = 4, date = 12
car[] = {2375, 7682, 2325, 2352}
fine[] = {25... | ALGO | 0.999674 | 5.808474 |
387f4505-1e8e-4b41-a495-632ca5dd214b | Jin294/coding_test | 프로그래머스/0/181872. 특정 문자열로 끝나는 가장 긴 부분 문자열 찾기/특정 문자열로 끝나는 가장 긴 부분 문자열 찾기.cpp | #include <string>
using namespace std;
string solution(string myString, string pat) {
return myString.substr(0, pat.size() + myString.rfind(pat));
} | ALGO | 0.998923 | 5.136097 |
a6265034-abb2-4220-b00b-ee3e216e5eb4 | betrayonenight/Oral_arithmetic_system | Circular.cpp | #include "Circular.h"
#include<iostream>
using namespace std;
void Circular::SetRadius(double Radius)
{
if (Radius > 0) {
this->Radius = Radius;
}
else {
cout << "Բ뾶" << endl;
Radius = 0;
}
}
double Circular::GetRadius()
{
return Radius;
}
double Circular::Getpi()
{
return pi;
}
double Circular::GetPerim... | TOOL | 0.958011 | 4.81942 |
771621ec-f210-4371-a444-30657a9cc54c | ishandutta2007/codeforces | qoo2p5/normal/797/D.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = (int) 1e9 + 123;
const ll LINF = (ll) 1e18 + 123;
#define sz(x) (int) (x).size()
#define pb(x) push_back(x)
#define mp(x, y) make_pair(x, y)
#define all(x) (x).begin(), (x).end()
void run();
int main() {
#ifndef LOCAL
ios::syn... | ALGO | 0.99966 | 3.73984 |
acbca399-7f85-47ad-9108-2fc30156c008 | petar-brankovic8/Competitive-Programming | 4. CF58-D2-C Medium (Bucketing)/4. CF58-D2-C.cpp | #include <bits/stdc++.h>
using namespace std;
void solve() {
//Input
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
//Bucketing
unordered_map<int, int> bucketSize;
for (int i = 0; i < n/2; i++) {
if (a[i] - i > 0) bucketSize[a[i] - ... | ALGO | 0.999583 | 4.585014 |
1f981101-7ff8-4e28-80a9-47c11210bf13 | redrabbit329/copy-vitis-tutorials | docs/bloom/design/reference_files/dataflow/compute_score_fpga.cpp | #include<iostream>
#include<ctime>
#include<utility>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<hls_stream.h>
#include"sizes.h"
#include"MurmurHash2.c"
const unsigned int bloom_filter_size = 1<<bloom_size;
extern "C"
{
void read_dataflow(hls::stream<unsigned int>& read_stream,const unsigned int* ... | ALGO | 0.995987 | 5.752094 |
4fc8778b-db25-4574-9be1-984200dd0b68 | MohamedElbashar/ProblemSolving-Archive | Training/PST/PST/Decoding.cpp | #include <bits/stdc++.h>
using namespace std;
int n,cnt;
vector<char> vn, vp, vs;
int main() {
string s;
int t;
cin >> t;
//freopen("myfile.txt", "w", stdout);
while (t--) {
cin>>s;
for (int i = 0; i < s.length(); i++) {
if (isalpha(s[i])) {
vs.push_back(s[i]);
} else if (s[i] - '0' >= 0 && s[i] - '... | ALGO | 0.999756 | 4.983827 |
9dc67e39-b2d3-49e8-bc2f-07680f6f6f05 | ExynosRom/android_bionic | libc/bionic/libc_init_common.cpp | #include "libc_init_common.h"
#include <elf.h>
#include <errno.h>
#include <fcntl.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/auxv.h>
#include <sys/personality.h>
#include <sys/time.h>
#include <unistd.h>
#include "private/bionic_auxv.h"
#include... | TOOL | 0.896875 | 7.680438 |
f952841b-ad71-461d-856c-87a2c455953c | Shivayayy/DataStructureAndAlgorithm | 1482-minimum-number-of-days-to-make-m-bouquets/1482-minimum-number-of-days-to-make-m-bouquets.cpp | class Solution {
public:
int boquetsMade(vector<int>& bloomDay,int day,int k,int m)
{
int consDays =0;
int ans =0;
for(int i=0;i<bloomDay.size();i++)
{
if(bloomDay[i]<=day)consDays++;
else
{
ans += consDays/k;
... | ALGO | 0.999999 | 6.013649 |
196df127-85b5-4284-889b-c4bce3c794a3 | xgao922/FDU-Programming-Test | Code/2012-1_2.cpp | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
bool cmp(int a, int b) {
return a > b;
}
int main() {
int num;
vector<int> heap;
freopen("data.txt", "r", stdin);
freopen("res.txt", "w", stdout);
while(scanf("%d", &num) != EOF) {
heap.push_back(num);
... | ALGO | 0.999905 | 3.53977 |
0bbb1eb7-c3a9-4c66-8030-f615958e67ac | pgoq/ICPC-Library | Math/fft.cpp | // FFT
//
typedef complex<double> C;
void fft(vector<C> &a){
int n = a.size(), L = 31 - __builtin_clz(n);
static vector<complex<long double>> R(2, 1); // 10% faster if double
static vector<C> rt(2, 1);
for(static int k=2; k<n; k*=2){
R.resize(n);
rt.resize(n);
auto x = polar(1.0L, acos(-1.0L)/k);
... | ALGO | 0.999919 | 4.505143 |
71da5529-f6ce-4c1b-8865-ad441549d905 | sumit11899/DSA-BOOTCAMP-Shape-AI | ques3.cpp | //leap yr
#include<iostream>
using namespace std;
int main()
{
int yr;
cin >> yr;
if ((yr % 4 == 0 && yr % 100 != 0) || (yr % 400 == 0))
cout << "given yr is a leap yr";
else
cout << "given yr is a not leap yr";
return 0;
} | ALGO | 0.999901 | 3.240199 |
fde0cfc4-810d-4841-bfbc-b842b713499f | Abhigaud/allCode | alphaCPP/11_loops/f10_practice2.cpp | #include<iostream>
using namespace std;
int main(){
int n = 10829;
int sum = 0;
while (n > 0)
{
int ld= n%10;
cout << ld;
n/=10;
}
} | ALGO | 0.999577 | 3.44218 |
c2c3dec2-8cf5-41a0-9079-9a52ac167139 | Reaning/leetcodeCode | .leetcode/162.寻找峰值.cpp | /*
* @lc app=leetcode.cn id=162 lang=cpp
*
* [162] 寻找峰值
*/
#include<bits/stdc++.h>
using namespace std;
// @lc code=start
class Solution {
public:
int findPeakElement(vector<int>& nums) {
int n = nums.size();
if(n == 1)return 0;
int left = 0,right = n - 1;
while(left < right){
... | ALGO | 0.99992 | 5.556397 |
f91d9a93-cff9-4526-a86d-14fed7c292e1 | vldb24p771/crdb_rls | cockroach_rls/c-deps/geos/src/geomgraph/DirectedEdge.cpp | #include <geos/geomgraph/Edge.h>
#include <geos/geomgraph/EdgeRing.h> // for printing
#include <geos/geomgraph/DirectedEdge.h>
#include <geos/geomgraph/Label.h>
#include <geos/geom/Location.h>
#include <geos/geom/Position.h>
#include <geos/util/TopologyException.h>
#include <cmath>
#include <cassert>
#include <string>... | ALGO | 0.993674 | 6.35597 |
8b728a87-fe43-4ff0-9881-2d9285a9b3c4 | arpansahu/LinkedListInCandCpp | singly linked list/function_to_get_Nth_node_in_a_Linked_List.cpp | #include <stdio.h>
#include <malloc.h>
struct node{
int data;
struct node * next;
};
struct node* start = NULL;
void insertStart(struct node ** s,int data);
void display(struct node **s);
struct node * returnNodeAtPos(struct node **s,int pos );
int main()
{ struct node * varnode;
insertStart(&start,10);... | ALGO | 0.986335 | 3.729441 |
e9502cb7-5264-48d5-a8d1-f4d7cb75f3dd | purple-jwl/atcoder | src/ABC/115/C.cpp | #include <bits/stdc++.h>
#define REP(i, x, n) for (int i = x; i < (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) (int)(x.size())
#define popcount(x) __builtin_popcount(x)
#define popcountll(x) __builtin_popcountll(x)
#define un... | ALGO | 0.999876 | 3.790061 |
36680a60-362e-4d52-a1b5-8e1c7fb8031b | yiyin/git_examples | lectures/lecture16/preincrement.cpp | /*
* Program: Illustrate the usage of preincrement
* Author: Yiyin Zhou
* Date: 2024/10/26
*
* Description:
* ++a is the preincrement, so the value of a will be
* incremented, then the resulting value of a will be
* returned and assign to b. So the value of b is 2.
*
* Note that a reference to the object a r... | ALGO | 0.972183 | 4.989689 |
8ce16685-e759-4ced-aa87-fb1d494aed89 | sarvex/leetcode-c3 | solution/1900-1999/1992.Find All Groups of Farmland/Solution.cpp | class Solution {
public:
vector<vector<int>> findFarmland(vector<vector<int>>& land) {
vector<vector<int>> ans;
int m = land.size();
int n = land[0].size();
for (int i = 0; i < m; ++i) {
for (int j = 0; j < n; ++j) {
if (land[i][j] == 0 || (j > 0 && land[i... | ALGO | 0.999915 | 5.803857 |
0c4a7202-12aa-49f2-bdba-424fd2dfba43 | Cloud-CV/object-proposals | rigor/rigor_src/boykov_maxflow/examples/utils.cpp | // @authors: Ahmad Humayun
// @contact: <EMAIL>
// @affiliation: Georgia Institute of Technology
// @date: Fall 2013 - Summer 2014
#include "examples.h"
void create_seed_list(const unsigned int fg_nodes[], const unsigned int NUM_ELEMS,
GraphType::SrcSeedList& seed_list)
{
seed_l... | ALGO | 0.998785 | 5.427926 |
7654889e-c1b1-420f-ab33-1ee626d6a739 | jennytellne/Box-3D | Test OpenGL/main.cpp |
/*
* A C++ framework for OpenGL programming in TNM046 for MT1 2014.
* This is a small, limited framework, designed to be easy to use
* for students in an introductory computer graphics course in
* the first year of a M Sc curriculum. It uses custom code
* for some things that are better solved by external librari... | TOOL | 0.983819 | 4.382037 |
fc80e598-daf0-4551-83d5-9a0910a2ad4a | FacundoPol/Punteros_c | tp2_p10_2024.cpp | #include <iostream>
using namespace std;
typedef struct tnodo *pnodo;
typedef struct tnodo{
char dato;
pnodo sig;
};
typedef struct tlista{
pnodo inicio;
pnodo fin;
int cant;
};
void mostrar(tlista lista);
void cambio(char &a,char &b);
void ordenar(tlista &lista);
pnodo quitar_nodo(tlista &lista,char valor);
vo... | ALGO | 0.998989 | 4.431704 |
1e433956-7c1a-4516-be83-4cb7f6dee8cc | marble-develop/leaf_frameworks_av | media/libeffects/loudness/dsp/core/dynamic_range_compression.cpp | //#define LOG_NDEBUG 0
#include <cmath>
#include "common/core/math.h"
#include "common/core/types.h"
#include "dsp/core/basic.h"
#include "dsp/core/interpolation.h"
#include "dsp/core/dynamic_range_compression.h"
#include <android/log.h>
namespace le_fx {
// Definitions for static const class members declared in
/... | ALGO | 0.996097 | 6.419666 |
d5f34865-050a-4545-a6b7-f870fcac73d3 | Vdtpro/DSA | Segment tree, Fenwick/Static Sum/Fenwick.cpp | #include<bits/stdc++.h>
using namespace std;
using ull = unsigned long long;
using ll = long long;
#define file() freopen("Test2.inp", "r", stdin); freopen("Test2.out", "w", stdout);
#define faster() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define pq_min priority_queue<int, vector<int>, greater<int>>
#d... | ALGO | 0.999919 | 4.437067 |
76bf0fd7-4cca-46d4-87d2-8b668980cf84 | jizhang-cmu/autonomy_stack_diablo_setup | src/slam/dependency/gtsam/gtsam_unstable/slam/tests/testInvDepthFactorVariant3.cpp | /*
* testInvDepthFactorVariant3.cpp
*
* Created on: Apr 13, 2012
* Author: cbeall3
*/
#include <CppUnitLite/TestHarness.h>
#include <gtsam_unstable/slam/InvDepthFactorVariant3.h>
#include <gtsam/nonlinear/NonlinearEquality.h>
#include <gtsam/nonlinear/LevenbergMarquardtOptimizer.h>
#include <gtsam/nonlinear... | TEST | 0.980958 | 7.297448 |
a61385ac-b3b9-4e78-b6cd-f30e357dd266 | injeChoi/Problem_Solving | BOJ/BOJ_1431_시리얼번호.cpp | #include <bits/stdc++.h>
using namespace std;
int N;
vector<string> v;
string str;
void init() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
}
int toInteger(string s) {
int size = 0;
for (int i = 0; i < s.length(); i++) {
char ch = s[i];
if (ch >= '0' && ... | ALGO | 0.999884 | 5.2175 |
5e11c453-1ad2-4747-b40a-c8e5121d81ec | Justpeli/Tecnologias-de-la-programacion- | Gameenginesegundoparcial/src/collision/b2_time_of_impact.cpp | #include "box2d/b2_collision.h"
#include "box2d/b2_distance.h"
#include "box2d/b2_circle_shape.h"
#include "box2d/b2_polygon_shape.h"
#include "box2d/b2_time_of_impact.h"
#include "box2d/b2_timer.h"
#include <stdio.h>
B2_API float b2_toiTime, b2_toiMaxTime;
B2_API int32 b2_toiCalls, b2_toiIters, b2_toiMaxIters;
B2_AP... | ALGO | 0.999758 | 6.949615 |
dfce378f-50bc-41ec-85a3-cb1494d9af32 | immortaltw/MPC-Project | src/Eigen-3.3/failtest/fullpivqr_int.cpp | #include "../Eigen/QR"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define SCALAR int
#else
#define SCALAR float
#endif
using namespace Eigen;
int main()
{
FullPivHouseholderQR<Matrix<SCALAR,Dynamic,Dynamic> > qr(Matrix<SCALAR,Dynamic,Dynamic>::Random(10,10));
}
| TEST | 0.86529 | 3.138753 |
23a250df-c019-48e9-aac2-9a62df536669 | naxocist/POSN-IPST | SPOJ/NKLEAVES_bruteforce.cpp | #include <bits/stdc++.h>
using namespace std;
#define INF 2e9
#define show(x) cout << #x << " is: " << x << '\n';
#define div() cout << "############\n";
#define all(x) x.begin(), x.end()
#define countBit(x) __builtin_popcount(x)
#define lsb(x) x&-x
#define pb emplace_back
using ll = long long;
using pi = pair<int, int... | ALGO | 0.999879 | 3.51791 |
0db12594-de63-428c-afaf-765284d1fec5 | Dinichthys/Mandelbrot | src/draw.cpp | #include "mandelbrot.h"
#include "draw.h"
#include <x86intrin.h>
#include "My_lib/Assert/my_assert.h"
#include <SFML/Graphics/Vertex.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <SFML/System.hpp>
static enum MandelbrotError AnalyseKey (const sf::Event event,
... | TOOL | 0.931494 | 5.243016 |
9971afc9-56f3-4e7c-b44c-e436a3f237bb | yuliangzhong/2D_FEM_Simulation | ext/eigen/bench/sparse_lu.cpp |
// g++ -I.. sparse_lu.cpp -O3 -g0 -I /usr/include/superlu/ -lsuperlu -lgfortran -DSIZE=1000 -DDENSITY=.05 && ./a.out
#define EIGEN_SUPERLU_SUPPORT
#define EIGEN_UMFPACK_SUPPORT
#include <Eigen/Sparse>
#define NOGMM
#define NOMTL
#ifndef SIZE
#define SIZE 10
#endif
#ifndef DENSITY
#define DENSITY 0.01
#endif
#ifnd... | ALGO | 0.996799 | 4.197675 |
c153e4a4-4c49-4553-8151-83bf4eadd7bd | kankanchatterjee/assignment-23 | 6.cpp | #include<iostream>
using namespace std;
int main()
{
int a,b,c;
cout<<"Enter three numbers";
cin>>a>>b>>c;
cout<<"The average is "<<(a+b+c)/3;
}
| ALGO | 0.888034 | 3.271807 |
800150fa-ea64-4e1b-a60e-ddbf5d1dafb0 | rafaelaaugusto/tasky_pro | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.