uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
b952feeb-ab77-47d9-93f8-4d67c3f6fe02 | junhochoi-dev/algorithm | [PS]BOJ/10000_19999/10000_10999/10874/boj10874.cpp | #include <iostream>
using namespace std;
int main() {
int test_case, ans, cnt;
cin >> test_case;
for (int n = 0; n < test_case; n++) {
cnt = 0;
for (int m = 1; m <= 10; m++) {
cin >> ans;
if (ans == ((m - 1) % 5 + 1))
cnt++;
}
if (cnt == 10)
cout << n + 1 << endl;
}
return 0;
} | ALGO | 0.999858 | 3.545333 |
9459df84-69db-4af4-aa11-11c16972a0ef | CodeTrans-Research/RefuTra | result/translate/transcoder/java2cpp/c++/MAXIMUM_POSSIBLE_DIFFERENCE_TWO_SUBSETS_ARRAY_1.cpp | int f_gold ( int * arr , int n ) {
int result = 0 ;
sort ( arr , arr + n ) ;
for ( int i = 0 ;
i < n - 1 ;
i ++ ) {
if ( arr [ i ] != arr [ i + 1 ] ) {
result += abs ( arr [ i ] ) ;
}
else {
i ++ ;
}
}
if ( arr [ n - 2 ] != arr [ n - 1 ] ) {
result += abs ( arr [ n - 1 ] ) ... | ALGO | 0.999804 | 4.243464 |
9ef0ff3a-1171-4b12-bd6e-9e2f861dd884 | wavedatahealth/wavedata-hedera | wavedata-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.998875 | 6.797273 |
2ddec04f-46e2-4d91-bce3-676f140a296e | ishandutta2007/codeforces | lyc/normal/788/C.cpp | #include<bits/stdc++.h>
using namespace std;
int t,n,p,l,r,a,f[1000000];
queue<int> q;
int main()
{
scanf("%d%d",&p,&n);l=0,r=0;
memset(f,0x3f,sizeof(f));
for (int i=1;i<=n;i++) scanf("%d",&a),f[a-p+1000]=1;
for(int i = 0; i <= 2000; i++)
if (f[i] == 1)
q.push(i);
while (!q.empty())
... | ALGO | 0.999886 | 3.049386 |
7760ac61-19e6-4225-9f6a-1f48f9a700fb | sam-mix/beginning-cpp20 | Examples/Modules/Chapter 09/Ex9_03A.cpp | // Using std::span<const T> to ensure largest() works for const inputs
import <iostream>;
import <string>;
import <vector>;
import <array>;
import <span>;
// Old function prototypes
//double largest(const double data[], size_t count);
//double largest(const std::vector<double>& data);
//int largest(const std::vector<i... | ALGO | 0.999951 | 7.146094 |
84ec03f2-0fc9-44ca-bfb5-b3524360997e | MiaoGaoUK/Leetcode | [1094]car-pooling.cpp |
//leetcode submit region begin(Prohibit modification and deletion)
class Solution {
public:
bool carPooling(vector<vector<int>>& trips, int capacity) {
vector<int> diff(1001,0);
for(auto trip : trips){
diff[trip[1]] += trip[0];
diff[trip[2]] -= trip[0];
}
i... | ALGO | 0.999603 | 6.556019 |
8a262d58-286f-494b-99d4-85304968bbda | Champ2001/Cpp | Striver/largest_subarray_with0sum.cpp | #include<bits/stdc++.h>
using namespace std;
int maxSubarray(int A[],int n){
unordered_map<int,int> mpp;
int maxi=0;
int sum=0;
for(int i=0;i<n;i++){
sum+=A[i];
if(sum ==0){
maxi=i+1; //
}
else if(mpp.find(sum) != mpp.end()){ //check whether the prefixsum pre... | ALGO | 0.999811 | 4.730184 |
4707b39e-67c0-426c-b244-f1ed382b6c2a | akanksha2024/DAA2022_Akanksha-2016600- | Practical/week1/2.keysearch(O(nlogn)).cpp | #include <bits/stdc++.h> //time complexity O(nlogn)
using namespace std;
int binarySearch(int arr[],int l,int r,int x)
{
if (r >= l) {
int mid = l + (r - l) / 2;
if (arr[mid] == x)
return mid;
if (arr[mid] > x)
return binarySearch(arr, l, mid - 1, x);
return bi... | ALGO | 0.999902 | 5.83732 |
d4813bca-ce3d-4baf-9869-f03833892ab0 | felipesdias/Extractor-URI-Online-Judge | URI-EN/AD-HOC/1591 - Grandma's Day.cpp | // Author: Felipe Souza Dias <<EMAIL>>
// Name: Grandma's Day
// Level: 1
// Category: AD-HOC
// URL: https://www.urionlinejudge.com.br/judge/en/problems/view/1591
#include <stdio.h>
#include <string.h>
int main () {
int t, l, c, i, j, p, k, count, tamProcurada;
char palavra[500][60], procurada[60], entrada;
sc... | ALGO | 0.998601 | 3.460481 |
4a3a2d2e-7855-428d-889e-4b5bfcaff27c | FlashSQL/MySQL-Data-Redistribution | mysql-5.6.26/extra/yassl/taocrypt/src/integer.cpp | /* based on Wei Dai's integer.cpp from CryptoPP */
#include "runtime.hpp"
#include "integer.hpp"
#include "modarith.hpp"
#include "asn.hpp"
#ifdef __DECCXX
#include <c_asm.h> // for asm overflow assembly
#endif
#if defined(_M_X64) || defined(_M_IA64)
#include <intrin.h>
#pragma intrinsic(_umul128)
#endif
... | ALGO | 0.994121 | 5.90249 |
db53990b-e86b-4c2a-81e3-997b888ab477 | ishandutta2007/codeforces | kotatsugame/normal/1426/D.cpp | #include<cstdio>
#include<set>
using namespace std;
int N;
main()
{
scanf("%d",&N);
set<long long>S;
S.insert(0);
long long now=0;
int ans=0;
for(int i=0;i<N;i++)
{
int A;scanf("%d",&A);
now+=A;
if(S.find(now)!=S.end())
{
ans++;
S.clear();
S.insert(0);
now=A;
}
S.insert(now);
}
printf("... | ALGO | 0.999655 | 3.573946 |
acc29716-ec8b-46e8-9d08-01bb29ee7d73 | vietnt85/vietntT1909E | bai tap 7/a7.3.cpp | #include <stdio.h>
int main()
{
int n;
printf ("Nhap n =\n");
scanf ("%d", &n);
int ary[n];
for (int i=0; i<n;i++)
{
printf ("Nhap phan tu ary[%d]\n",i);
scanf ("%d",&ary[i]);
}
int dem=0, max_dem=0;
for (int i=0; i<n; i++)
{
if (ary[i]>0){
dem++;
}else {
dem = 0;
}
if (dem>max_dem)
{
... | ALGO | 0.999211 | 3.260527 |
37723925-3dba-4ded-b7c4-20d082dfb3c0 | IIIIIIIIIU/onlysky | 5106.cpp | #include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
typedef long long ll;
const int maxn=2e5+5;
int n;
ll L,S,hi[maxn],ai[maxn];
inline void read(int &now)
{
char Cget;
now=0;
while((Cget=getchar())>'9'||Cget<'0');
while(Cget>='0'&&Cget<='9')
{
now=now*10+Cget-'0';
Cget=getchar();
}
... | ALGO | 0.99991 | 3.120649 |
1a86c99e-1393-49d8-896b-adb2f2ec6bfe | Colloportus0/MLIRSmith11 | llvm/lib/Analysis/InlineOrder.cpp | #include "llvm/Analysis/InlineOrder.h"
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/BlockFrequencyInfo.h"
#include "llvm/Analysis/GlobalsModRef.h"
#include "llvm/Analysis/InlineAdvisor.h"
#include "llvm/Analysis/InlineCost.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/Anal... | ALGO | 0.967453 | 7.867161 |
91da46c2-da78-432c-b202-22fab049ca67 | Jay7221/competitve-programming | codeforces/educational_rounds/EducationalRound150/D.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
void solve(){
int n;
cin >> n;
vector<int> l(n), r(n);
for(int i = 0; i < n; ++i){
cin >> l[i] >> r[i];
}
auto overlap = [&](int l1, int r1, int l2, int r2){
if((l1 <= l2) && (l2 <= r1)){
return true;
... | ALGO | 0.999736 | 5.193027 |
97a02dc3-b9eb-4420-97fd-8d70c62cc3e3 | hztttt/Synergistic_Optimization | lammps_DeepSPIN/src/OPENMP/fix_gravity_omp.cpp | // clang-format off
/* ----------------------------------------------------------------------
Contributing author: Axel Kohlmeyer (Temple U)
------------------------------------------------------------------------- */
#include "fix_gravity_omp.h"
#include "atom.h"
#include "update.h"
#include "input.h"
#include "... | ALGO | 0.981481 | 7.61666 |
00d4d619-1224-4298-8125-3f94ef779815 | PranjalKumar09/C-Data-Structures | DP/best_time_stocks2.cpp |
#include <bits/stdc++.h>
using namespace std;
vector<long> arr = {1, 3, 2, 8, 4, 9};
int n = arr.size();
/*
Buying stocks, once maximum profit 2
same like 1, but here can do infinitely but not more than one at same time
first buy come then sell
do in like Buy Sell Buy Sell ...
... | ALGO | 0.999957 | 4.204187 |
b1b46b70-975d-47ed-8f3b-086dd4bf7d7b | shamikh1014/code8 | trb7.cpp | // Construct Tree from Preorder and Inorder
// Problem statement
/*
For a given preorder and inorder traversal of a Binary Tree of type integer stored in an array/list, create the binary tree using the given two arrays/lists. You just need to construct the tree and return the root.
Note:
Assume that the Binary Tree... | ALGO | 0.999985 | 5.414196 |
16886487-2f4e-42cb-8f39-bda07547f8e3 | sairaj-78/NewStart | my code/SumODigits.cpp | #include <iostream>
using namespace std;
int main (){
int n ;
cout << "enter a number:";
cin >> n;
int sum = 0 ;
int last ;
while (n != 0){
last = n%10;
sum = last + sum;
n = n/10;
}
cout << "the sum of digits is :"<<sum;
} | ALGO | 0.999778 | 3.975689 |
14d6c208-a9a6-4e43-a3c3-ae70736656d9 | Meschale/data_structures_c | Depth-FirstTraversel.cpp | #include<stdlib.h>
#include<stdio.h>
int G[6][6] = {
{0,1,1,0,0,1},
{1,0,1,1,1,0},
{1,1,0,0,1,0},
{0,1,0,0,1,0},
{0,1,1,1,0,1},
{1,0,0,0,1,0},
};
int visited[6] = {0,0,0,0,0,0};
void DFT();
void TraverseGraph(int node);
int main(){
DFT();
return 0;
}
void DFT(){
for(int i=0;i<6;i++){
... | ALGO | 0.999961 | 4.318754 |
19dca29f-4bd3-49e1-aa84-f74f295047af | 113bommy/deepmind_codecontests_refine | cpp_source_filter_file/cpp_train_3460_58.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
while (t--) {
long long int a, b, c, d;
cin >> a >> b >> c >> d;
cout << b << " " << c << " " << d << "\n";
}
}
| ALGO | 0.996672 | 3.580025 |
0a72af4e-25ec-42cb-b818-82209f4d12cf | ABDElRAHMAN-2003/Problem-Solving | k-divisible sum.cpp |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double lf;
#define pp pair<ll,ll>
#define dbg printf("in");
#define NL printf("\n");
#define pi 3.1416
#define Size 100010
#define inf 1000000000000
#define max2(a,b) ((a<b)?b:a)
#define max3(a,b,c) max2(max2(a,b),c)
#define min2(... | ALGO | 0.99991 | 3.376195 |
11cd2003-5609-4316-a082-58057e5a8647 | emd22/arch-engine | include/Bullet/BulletCollision/Gimpact/gim_tri_collision.cpp | /*! \file gim_tri_collision.h
\author Francisco Leon Najera
*/
#include "gim_tri_collision.h"
#define TRI_LOCAL_EPSILON 0.000001f
#define MIN_EDGE_EDGE_DIS 0.00001f
class GIM_TRIANGLE_CALCULATION_CACHE
{
public:
GREAL margin;
btVector3 tu_vertices[3];
btVector3 tv_vertices[3];
btVector4 tu_plane;
btVector4 tv_... | ALGO | 0.999768 | 5.737035 |
6b58124f-0b09-419c-9a2d-285f1b0272b8 | giver-kdk/C_CPP_Ubuntu | CPP Programming/College/_3 Assignments/function_template.cpp | // Program to demonstrate the use of function template
#include <iostream>
using namespace std;
template <class Type>
Type multiply(Type a, Type b)
{
Type result = a * b;
return result;
}
int main()
{
cout << "Product: " << multiply(2, 3) << endl;
cout << "Product: " << multiply(10.5, 5.6) << endl;
return 0;
} | ALGO | 0.938361 | 5.771419 |
0c313b51-4170-4fe9-a1a3-9b76dcad150f | vwzn/Struktur-Data | pemodulan.cpp | #include <iostream>
#include <conio.h>
#include <stdio.h>
using namespace std;
struct node {
char nama[10];
int umur;
node* next; // Pointer menyambung ke node selanjutnya
};
node* awal_ptr = NULL; // Pointer awal list
void sisip() {
node* temp, * temp2;
for (int n = 0; n < 3; n++) {
temp... | TOOL | 0.94999 | 4.456329 |
98251e95-d32b-4f70-b610-3257976674f2 | GitCodeBoy/unreal-editor-dev | Engine/Source/ThirdParty/ICU/icu4c-64_1/source/common/uset.cpp | #include "unicode/utypes.h"
#include "unicode/uobject.h"
#include "unicode/uset.h"
#include "unicode/uniset.h"
#include "cmemory.h"
#include "unicode/ustring.h"
#include "unicode/parsepos.h"
U_NAMESPACE_USE
U_CAPI USet* U_EXPORT2
uset_openEmpty() {
return (USet*) new UnicodeSet();
}
U_CAPI USet* U_EXPORT2
uset_o... | TOOL | 0.888171 | 7.516296 |
c149ee6a-8136-4936-a404-df74a703bc8f | Maaz976/PF-and-OOP | PF-Lab Tasks and Quizzes/Week 12 Lab Task/task_03.cpp | #include<iostream>
using namespace std;
int main()
{
int primes=0, array[10];
int i, temp, j, k;
for(i=0;i<10;i++)
{
cout<<"Enter a number : ";
cin>>array[i];
}
cout<<endl;
for(i=0;i<10;i++)
{
temp=array[i];
k=0; //For each iteration--->each number o... | ALGO | 0.998306 | 3.722437 |
211b7593-8609-461f-83a0-31c50e566cec | exthmui-aosp/android_frameworks_native | libs/input/VirtualKeyMap.cpp | #define LOG_TAG "VirtualKeyMap"
#include <stdlib.h>
#include <string.h>
#include <input/VirtualKeyMap.h>
#include <utils/Log.h>
#include <utils/Errors.h>
#include <utils/Tokenizer.h>
#include <utils/Timers.h>
// Enables debug output for the parser.
#define DEBUG_PARSER 0
namespace android {
static const char* WHIT... | TOOL | 0.872131 | 6.258742 |
13958ebb-1489-4e41-b9fb-4b9f1a2dac19 | linhenry2004/Algorithms | Data Structures:Algorithms/Solutions/Heaps/WeakestRows.cpp | #include<bits/stdc++.h>
using namespace std;
vector<int> kWeakestRows(vector<vector<int>>& mat, int k) {
priority_queue <pair<int,int>, vector<pair<int,int>>, greater<pair<int,int>> > pq; //Min-heap
for(int i=0;i<mat.size();i++)
{
int count=0;
for(int j=0;j<mat[i].size()... | ALGO | 0.999933 | 4.293762 |
1aa47a70-09a5-405c-8214-e5eb1a87694a | oCreaCo/LOCATOR | PostgreSQL/llvm-project/mlir/lib/IR/Dominance.cpp | #include "mlir/IR/Dominance.h"
#include "mlir/IR/Operation.h"
#include "mlir/IR/RegionKindInterface.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/Support/GenericDomTreeConstruction.h"
using namespace mlir;
using namespace mlir::detail;
template class llvm::DominatorTreeBase<Block, /*IsPostDom=*/false>;
template cl... | ALGO | 0.990557 | 7.281507 |
bb541c7a-1b08-445a-84ff-11428a0e430f | jjcr1spy/leetcode | cpp_soln/serial_deserial_bt.cpp | #include <string>
#include <sstream>
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Codec {
public:
// Encodes a tree to a single string.
std::string seriali... | ALGO | 0.998761 | 7.200719 |
d4e68af5-6df0-4fd1-9ab9-622a1ab96ab4 | Sharanpoojarissp/Number-System-Codes- | 2.Palindrome-in-range/L2.cpp | #include<iostream>
using namespace std;
bool isPalindrome(int number){
int reverse = 0;
int n = number;
int digit;
while(number!=0){
digit = number % 10; // 100 --> 0 , 10--> 0 , 1
reverse = (reverse*10) + digit; // 0 0 1
number = number/10; // 10 , 1 , 0
... | ALGO | 0.999584 | 4.454821 |
c07af4c1-6779-4ea4-a1e4-940f06dcc234 | isaacmodeyin/Cpp-PROGRAMMING | compare_integers.cpp | // Write a program that:
// 1. Asks the user for two integers
// 2. prints the bigger one on the screen
#include <iostream>
using namespace std;
int main() {
int num1, num2;
// Ask the user for two integers
cout << "Enter the first integer: ";
cin >> num1;
cout << "Enter the second integ... | ALGO | 0.999305 | 4.646739 |
b89a8de7-5e35-4369-a602-e4c0441166fe | fyw4/C-plus-plus-learning-example | 第11章 流类库与输入输出/11_1.cpp | #include <iostream>
using namespace std;
int main() {
double values[] = {1.23, 35.36, 653.7, 4358.24};
for(int i = 0; i < 4;i++){
cout.width(10);
cout << values[i] << endl;
}
return 0;
} | ALGO | 0.987907 | 3.519351 |
b8f7e46c-e6b8-4d07-8126-516e4d36c8f1 | EdwardOu98/LeetCode | practices/Minimum_Time_Difference.cpp | #include <string>
#include <vector>
#include <algorithm>
using namespace std;
class Solution {
public:
int findMinDifference(vector<string>& timePoints) {
int n = timePoints.size();
// 时间点最多有24 * 60个,因此如果输入数组的长度超过这个值,则说明一定
// 有重复时间点,可以直接返回0
if(n > 24 * 60) {
return 0;
... | ALGO | 0.999686 | 5.747125 |
d14e6fd0-34b9-428a-9cb2-f109ca7e69c3 | mealisohail/cpp_code | CP/isBalanced.cpp | #include <bits/stdc++.h>
using namespace std;
struct Node
{
int data;
Node *right, *left;
Node(int val)
{
data = val;
right = NULL;
left = NULL;
}
};
int height(Node *root)
{
if (root == NULL)
{
return 0;
}
int lh = height(root->left);
int rh = h... | ALGO | 0.999838 | 6.071462 |
4e2bd312-998d-4714-ab0f-f8560d684332 | jacquezheng/LeetCode | MergeSortList.cpp | /**
* Sort List https://oj.leetcode.com/problems/sort-list/
* Sort a linked list in O(n log n) time using constant space complexity.
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
L... | ALGO | 0.999998 | 5.802083 |
b78da3a2-0e76-4a13-af1e-44eb03666f45 | samatakadam/LB | program556.cpp | #include<iostream>
using namespace std;
template <class T>
class ArrayX
{
public:
T *Arr;
int iSize;
ArrayX(int Value);
~ArrayX();
void Accept();
void Display();
bool LinearSearch(T Value);
bool BiDirectionalSearch(T Value);
bool BinarySearch... | ALGO | 0.999896 | 3.883194 |
3f399129-6c0b-440a-94e2-f0b974c3898a | Dev-Yadnesh/online_notes_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 |
2a9da1c9-a1af-4e35-b849-06ba79221733 | fs233/CS233_labs | Lab1/extractMessage.cpp | /**
* @file
* Contains an implementation of the extractMessage function.
*/
#include <iostream> // might be useful for debugging
#include <assert.h>
#include "extractMessage.h"
using namespace std;
unsigned char *extractMessage(const unsigned char *message_in, int length) {
// length must be a multiple of 8
... | TOOL | 0.939487 | 4.989976 |
049d5521-4374-49cc-aec8-96cd5abbb08d | Arkesh009/cpp_BroCode | BasicPractice/sortMarkList.cpp | // Use the sort() function to sort a list of student objects based on their marks.
// not the correct solution yet
#include<bits/stdc++.h>
using namespace std;
class student{
public:
string name;
double marks;
};
int main()
{
cout << "Enter the number of students\n";
int n;
cin >> n;
... | ALGO | 0.997925 | 4.8648 |
b0ae75d9-57a3-4b4f-8427-dce12c92ea6b | JunBinLiang/IO-Workbook | CF/Round-966(div3)/D(1200).cpp | #include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<unordered_set>
#include<map>
#include<string>
#include <string.h>
#include <bitset>
#include <queue>
using namespace std;
void solve() {
int n;
string s;
cin >> n;
vector<int> a(n);
long long sum = 0;
for(int i = 0;... | ALGO | 0.999919 | 4.200852 |
499551d9-6912-47ee-ad1f-9bb87522678d | richikchanda1999/zksm | circuits/add/add_cpp/calcwit.cpp | #include <iomanip>
#include <assert.h>
#include "calcwit.hpp"
extern void run(Circom_CalcWit* ctx);
std::string int_to_hex( u64 i )
{
std::stringstream stream;
stream << "0x"
<< std::setfill ('0') << std::setw(16)
<< std::hex << i;
return stream.str();
}
u64 fnv1a(std::string s) {
u64 hash ... | ALGO | 0.995196 | 3.99129 |
e5b910e9-fe12-400d-84ac-b52eaacd1837 | human-netizen/cpAlgo | Graph/articulationBridge.cpp | l n,m;
ll ans;
vector<int>g[N];
int co[N];
vector<bool> visited;
vector<int> tin, low;
int timer;
void dfs(int v, int p = -1) {
co[v]=1;
visited[v] = true;
tin[v] = low[v] = timer++;
bool parent_skipped = false;
for (int to : g[v]) {
if (to == p && !parent_skipped) {
parent_skip... | ALGO | 0.99975 | 4.356769 |
64da4701-14d5-4d67-a3a8-9f98f369a57c | fragosoa/interview-prep | lc-median-of-two-sorted-arrays.cpp | //
// main.cpp
// interviewprep
//
// Created by Adolfo Fragoso on 23/08/25.
//
#include <vector>
#include <unordered_map>
#include <map>
#include <iostream>
#include <unordered_set>
#include <set>
#include <queue>
#include <stack>
#include <list>
using namespace std;
/**
Leetcode 4: Median of two sorted arrays
... | ALGO | 0.999927 | 5.879138 |
0f8ca2c5-dd79-456a-a2ef-37a9f3a0de91 | KareemH-1/Cpp-Projects | Cpp-Basic-Codes/Games/Tic Tac Toe.cpp | #include<iostream>
using namespace std;
void fill(char x[3][3]) {
for (int r = 0; r < 3; r++) {
for (int c = 0; c < 3; c++) {
x[r][c] = '#';
}
}
}
void display(char x[3][3]) {
cout << "-------" << endl;
for (int r = 0; r < 3; r++) {
for (int c = 0; c < 3; c++) {
cout << x[r][c] << " ";
}
if (r < ... | ALGO | 0.998748 | 4.332988 |
e6e83967-cf2c-4d67-bc64-469d1c6a3835 | i-aman0/Cpp-Codes | CPProgrammingPathshala/StronglyConnectedComponents.cpp | #include <iostream>
#include <vector>
#include <cmath>
#include <ostream>
#include <list>
#include <map>
#include <algorithm>
#include <climits>
#include <sstream>
#include <iomanip>
#include <cstdio>
#include <bitset>
#include <cstring>
#include <iterator>
#include <deque>
#include <set>
#include <ctime>
#include <cst... | ALGO | 0.999973 | 5.073589 |
f8219c31-1b3a-45f7-8468-1dfc9ccf5ba3 | C-2023-1-3/8209230118- | 8209230118马思凯/2题.cpp | #include <iostream>
using namespace std;
int main(float x) {
cin >> x;
if (x > 0 && x < 1) {
cout << 3 - 2*x;
}
if (x >=1 && x < 5) {
cout << float(((1/x)/2)+1);
}if (x >= 5 && x < 10) {
cout << x*x;
}
return 0;
} | ALGO | 0.998883 | 3.037286 |
7872fbc2-09f9-4b07-82fc-0cc39600f614 | Shrestha005/DSA_cpp | 7.1.Recursion/3.sort_stack.cpp | #include<bits/stdc++.h>
using namespace std;
void insert_corr_pos(int x, stack<int> &s){
if(s.size()==0 || s.top()<x){
s.push(x);
return;
}
else{
int a= s.top();
s.pop();
insert_corr_pos(x,s);
s.push(a);
}
}
void sortStack(stack<int> &s){
if(s.size()... | ALGO | 0.999788 | 4.842069 |
f420c558-c425-4bfa-90ed-9d3e9c51a209 | leekeonl/C- | test38.cpp | #include <iostream> //call by value
using namespace std;
class Circle {
int radius;
public:
Circle();
Circle(int r);
~Circle();
double getArea() { return 3.14*radius*radius; }
int getRadius() { return radius;}
void setRadius(int radius) { this->radius = radius; }
};
Circle::Circle() {
radius = 1;
cout <<... | TOOL | 0.984077 | 5.687229 |
d0e402c0-2538-424b-972f-1b3eae913c11 | SaiVamshiK/Data-Structure-in-C- | Revised DS/Graphs/New/REVISE THIS FINDING ARTICULATION PTS.cpp |
Vice City is built over a group of islands, with bridges connecting them. As anyone in Vice City knows, the biggest fear of vice-citiers
is that some day the islands will submerge. The big problem with this is that once the islands submerge, some of the other islands could
get disconnected. You have been hired by th... | ALGO | 0.999797 | 4.857945 |
26402a28-1338-49cb-a487-c9ac7014abd6 | jeffyehtw/UVa | Volume 105/10530 - Guessing Game.cpp | #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main()
{
const string ans[2] = {
"Stan is dishonest\n",
"Stan may be honest\n"
};
int n;
while (cin >> n && n)
{
cin.get();
//input
string s;
int left = 1;
int right = 10;
while (getline(cin, s))
{
if (s == "... | ALGO | 0.992213 | 3.839881 |
7d34a604-565b-4a7c-901e-d131bab8ed3c | goropikari/CompetitiveProgramming | atcoder/dp/s.cpp | // https://atcoder.jp/contests/dp/tasks/dp_s
// 2025年06月07日 19時44分37秒
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
// using mint = modint998244353;
using mint = modint1000000007;
// modint::set_mod(10);
// using mint = modint;
#include <boost/multiprecision/cpp_int.hpp>
using namespace boost... | ALGO | 0.999953 | 5.325159 |
14340d6d-7b24-407e-bf7a-3247f4e44047 | alexluscan/Cpp-algorithms | Algoritmica/Dinamica/07.02/tg/tg_on_v2.cpp | //nr triplete 1<=p<q<r<=n aflate in progresie geometrica
#include<fstream>
#include<cmath>
using namespace std;
ifstream fin("tg.in");
ofstream fout("tg.out");
int v[4000010];
int main()
{
long long n,s,a,x,k1,k2,t,d,c,b,i,k,s1,p,r;
fin>>n;
s=0;
t=0;
for (a=1;a<=n-2;a++)
{
if(v[a]==0)//i... | ALGO | 0.999941 | 3.554717 |
c5deadcd-f3d5-4bac-b367-10ed95408660 | HHHHao-s/algorithm | 823.带因子的二叉树.cpp | #include "s.h"
/*
* @lc app=leetcode.cn id=823 lang=cpp
*
* [823] 带因子的二叉树
*/
// @lc code=start
class Solution {
public:
int numFactoredBinaryTrees(vector<int>& arr) {
map<long long, long long> node_num;
const long long div = 1000000007;
for(long long x: arr){
node_num.ins... | ALGO | 0.999924 | 6.422678 |
f1422059-48c9-4acf-90cf-3e6734ef9422 | oxygen-hunter/Flashboom | data/big-vul-100/add_attention_code/CodeLlama/top0-100/minimum-cost-to-reach-city-with-discounts-Solution.minimumCost/177786_DoS_Exec_Code_Overflow.cpp | void SplashOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
int width, int height,
GfxImageColorMap *colorMap,
int *maskColors, GBool inlineImg) {
double *ctm;
SplashCoord mat[6];
SplashOutImageData imgData;
SplashColorMode srcMode;
SplashImageSource src;
GfxGray gray;
GfxRGB rg... | TOOL | 0.866713 | 4.58041 |
11632bbe-08da-4452-8b74-2f009ae251b5 | 113bommy/deepmind_codecontests_refine | cpp_source_filter_file/cpp_train_9324_9.cpp | #include <bits/stdc++.h>
using namespace std;
void Read(int &x) {
char c;
bool flag = 0;
while (c = getchar(), c != EOF && (c < '0' || c > '9') && c != '-')
;
if (c == '-') {
c = getchar();
flag = 1;
}
x = c - '0';
while (c = getchar(), c != EOF && c >= '0' && c <= '9') x = x * 10 + c - '0';
... | ALGO | 0.999727 | 3.522341 |
8a762e9d-3aea-4072-a755-991516e8d783 | kharitonov-s/OldTasksCPP | Двоичная ли запись у числа(дз)/Проект7/Source.cpp | #include <iostream>
#include <ctime>
#include <cstring>
using namespace std;
bool isBinary(char *s) // (01011001)
{
int n = strlen(s);
for (int i = 0;i < n;++i)
{
if (s[i] != '0'&& s[i] != '1')
{
return false;
}
}
return true;
}
int main()
{
char s[32];
cin >> s;
cout << isBinary(s) << endl;
sy... | ALGO | 0.99811 | 3.739005 |
3df20080-4099-418b-be8f-c9e89f52ee95 | hma40/Cpp-Competitive-Programming | CSES/PoliceChase.cpp | #include <bits/stdc++.h>
std::string to_string(__int128_t value) {
if (value == 0) return "0";
std::string result;
bool negative = (value < 0);
if (negative) value = -value;
while (value > 0) {
result += '0' + (value % 10);
value /= 10;
}
if (negative) result +... | ALGO | 0.999953 | 5.016875 |
c879779e-c3ea-4211-b50d-d382f53444b1 | SeungjunHa/algorithm | 1629/a.cpp | #include <cstdio>
#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <string>
#include <algorithm>
#include <climits>
using namespace std;
#define likely(x) __builtin_expect((x), 1)
#define unlikely(x) __builtin_expect((x), 0)
int main(void)
{
ios_base :: sync_with_stdio(false);
cin.t... | ALGO | 0.999977 | 3.909794 |
66e305ac-cfac-423c-9ac2-1f55a201a8f0 | ishandutta2007/codeforces | luogubot/normal/1660/F2.cpp | #include<bits/stdc++.h>
#define For(i,a,b) for(int i=(a),i##END=(b);i<=i##END;i++)
#define Rof(i,b,a) for(int i=(b),i##END=(a);i>=i##END;i--)
#define go(u) for(int i=head[u];i;i=nxt[i])
#define int long long
using namespace std;
inline int read(){
int x=0,f=1;
char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=... | ALGO | 0.999985 | 4.033023 |
36598866-60ed-4398-bd76-a465d6395964 | sheyua/LAMMPS-QTB | src/angle_table.cpp | /* ----------------------------------------------------------------------
Contributing author: Chuanfu Luo (<EMAIL>)
------------------------------------------------------------------------- */
#include "math.h"
#include "stdlib.h"
#include "string.h"
#include "angle_table.h"
#include "atom.h"
#include "neighbor.h"... | TOOL | 0.996702 | 6.410715 |
2a56bf08-8a78-48d0-b47b-d5416ab6f94a | ishandutta2007/codeforces | compute/normal/1366/C.cpp | /* Aa^~ kokoro ga pyonpyon suru n jaa^~
// ZZZXXkXkkkZ!``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ```?Wfpppbpbbpbbpbbbkbkk
// ppbbbpbbpVr`` `` ` ` ` ` ```` `` ` ` `` ` ` ` ` ` ` ` ` ` dppbbkkkkkkkkkkqkqkk
// HkqqqqqkkWr`` ` ` ``` ``` `?G, ` ` ``.JC!```` ` ` `` `` ````(Wpbkkkkkkkkqkkkkkqk
// mmmmmqqqqpr` `` `` ``````... | ALGO | 0.999974 | 4.946192 |
fa828943-a6f9-4924-a1e9-a71815eb98bf | PrithwishJana/CoTran | CodeGen/data/transcoder_evaluation_gfg/cpp/SEARCH_ALMOST_SORTED_ARRAY.cpp | #include <iostream>
#include <cstdlib>
#include <string>
#include <vector>
#include <fstream>
#include <iomanip>
#include <bits/stdc++.h>
using namespace std;
int f_gold ( int arr [ ], int l, int r, int x ) {
if ( r >= l ) {
int mid = l + ( r - l ) / 2;
if ( arr [ mid ] == x ) return mid;
if ( mid > l && ... | ALGO | 0.999727 | 5.620202 |
dc8d749e-de57-4da2-a8b7-5fe6a6f84603 | vectorsss/improved-csd | libs/libcds2/src/static/sequence/SequenceWTRP.cpp | #include <sequence/SequenceWTRP.h>
#define WTRPHeur_TD 1
#define WTRPHeur_BU 0
#define WTRPHeur_REGULAR 0
namespace cds_static
{
ostream & operator<<(ostream &os, const terminal& p)
{
os << "id: " << p.id << ", len: " << p.len << ", noccs: " << p.noccs;
return os;
}
int comparePair (const void * a, const void... | ALGO | 0.997807 | 3.712102 |
0c5ad406-5403-493d-88d9-1d01645d727b | Xiaovy/acm | codeforces/CCPC final/I.cpp | #include <bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
#define lson rt << 1
#define rson rt << 1 | 1
#define ll long long
using namespace std;
const int maxn = 1e5;
vector <int> x,y,hor[maxn + 11];
int a[maxn + 11],b[maxn + 11];
int num[maxn + 11],cnt[maxn + 11];
struct node{
int maxx,cnt;
}tree[4 * maxn + 1... | ALGO | 0.999893 | 4.106246 |
8df1d9eb-b362-4097-a88b-e101d5db7cca | kishan62435/LeetCode-Questions | 0088-merge-sorted-array/0088-merge-sorted-array.cpp | class Solution {
public:
void merge(vector<int>& nums1, int m, vector<int>& nums2, int n) {
int bigar = m+n-1;
int n1=m-1, n2=n-1;
while(n1>=0 && n2>=0){
if(nums1[n1]>= nums2[n2]) nums1[bigar--] = nums1[n1--];
else nums1[bigar--] = nums2[n2--];
... | ALGO | 0.999976 | 5.181246 |
87ae75b8-a11b-40b9-a120-eefe54c1577e | Nitesh-Giri/DSA_with_Nitesh | Day-2/prime.cpp | #include<iostream>
using namespace std;
int main(){
int num;
cout<<"Enter a number: ";
cin>>num;
bool isPrime = true;
if(num<2){
cout<<"Its not a prime number"<<endl;
}
for(int i=2; i<num-1; i++){
if(num%i == 0){
isPrime = false;
}
}
if(isPrime... | ALGO | 0.998863 | 3.432236 |
92885acc-942e-4f4b-8881-8393169d872c | oldground/coding | softeer/LV1/A+B.cpp | // + 연산자를 사용할 줄 아는가?
// 소요시간 : 1분
#include<iostream>
using namespace std;
int main(int argc, char** argv)
{
int A, B, T;
cin >> T;
for (int i = 1; i <= T; i++) {
cin >> A >> B;
cout << "Case #" << i << ": " << A+B << endl;
}
return 0;
} | ALGO | 0.998112 | 5.507748 |
e5f86663-eb8c-4367-8113-e0ba27bfcd70 | Mjp777/C- | Largest Rectangle in Histogram.cpp | Largest Rectangle in Histogram
class Solution {
public:
int largestRectangleArea(vector<int>& heights) {
int ans = 0;
stack<int> stack;
for (int i = 0; i <= heights.size(); ++i) {
while (!stack.empty() &&
(i == heights.size() || heights[stack.top()] > heights[i])) {
const int... | ALGO | 0.999933 | 7.484421 |
3d8b5ca1-ae43-402f-a35b-2dc70f5f10eb | adhishanand9/ADI | Trees/arrayTree.cpp | #include<iostream>
using namespace std;
struct tree
{
int data;
struct tree *left,*right;
};
void printTree(struct tree *root)
{
if(root!=NULL)
{
printTree(root->left);
cout<<head->data<<" ";
printTree(root->right);
}
}
struct tree *newNode(int data)
{
struct tree *temp = (struct tree*)malloc(sizeof(str... | ALGO | 0.999881 | 4.813497 |
5dd89136-0852-472b-bd31-5b7b81f5f564 | psqq/semi-diplom | code/src/inv3.cpp | #include "inv3.h"
#include <algorithm>
using namespace std;
template <class T> Inv3<T>::Inv3() : is_empty(true), root() {}
template <class T> Inv3<T>::Inv3(Digraph<T> ag) : root() {
if (ag.number_of_nodes() == 0) {
is_empty = true;
return;
}
g = ag;
find_leaves();
root = find_root(g);
for (T v : g... | ALGO | 0.999209 | 4.992126 |
3c82b42d-16eb-4790-9824-aaed54e4030d | colleades/363_files | InClassGraphs.cpp | // A C++ program for Dijkstra's single source shortest path algorithm.
// The program is for adjacency matrix representation of the graph
#include <stdio.h>
#include <limits.h>
// Number of vertices in the graph
#define V 9
// A utility function to find the vertex with minimum distance value, from
//... | ALGO | 0.999972 | 4.99379 |
715ac819-8165-417a-af9f-dd4d98f3ea7e | Israt3064/CodeChef_Code | Saving Taxes.cpp | #include<bits/stdc++.h>
using namespace std;
void solve()
{
int x,y;
cin>>x>>y;
int res = x-y;
cout<<res<<endl;
}
int main()
{
int t;
cin>>t;
while(t--)
{
solve();
}
return 0;
}
| ALGO | 0.999878 | 4.573708 |
80337036-6ccb-4d5c-a56b-fb4a80329486 | legnaleurc/junkcode | algorithm/leetcode/287.cpp | class Solution {
public:
int findDuplicate(vector<int>& nums) {
int sp = nums[0];
int fp = nums[nums[0]];
while (sp != fp) {
sp = nums[sp];
fp = nums[nums[fp]];
}
sp = 0;
while (sp != fp) {
sp = nums[sp];
fp = nums[fp];
... | ALGO | 0.999982 | 6.023634 |
2244eb73-5d53-468d-bb7f-44ad0a0894a0 | JdMDE/ppamlib | src/examples/pardis.cpp | #include <iostream>
#include <cstdlib>
/**
* @file pardis.cpp
* @brief <h2>pardis</h2>
* See program use in the documention to main() below\n
* \n
* NOTE: The includes in this source file are for compilation of this program as an example together with the library,\n
* before the library itse... | TOOL | 0.997744 | 4.838624 |
5ed38381-08df-4a34-9b00-4ba1a825d37f | josemailson/logica-e-linguagem-de-programacao | APOSTILA 3 PG 30/6_vetor invertido.cpp | #include <stdio.h>
main()
{
int q, i, j, aux, vetor[q], continuar;
do
{
printf("\nDigite o elemento %d do vetor:\n ",q+1);
scanf("%d",&vetor[q]);
q++;
printf("Deseja continuar? 1-sim 2-nao: ");
scanf("%d", &continuar);
} while ((continuar==1));
for (i=0; i<q/2; i++)
{
aux = vetor[i];
veto... | ALGO | 0.997877 | 3.286058 |
a04b6507-0b5a-42ff-8a18-dbfc229a779a | StrawHatWess/Competitive-Programming-Solutions | France IOI/Brûler de la poudre.cpp | //Never stop trying
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#define boost ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
typedef string str;
typedef long long ll;
#define int ll
typedef double db;
typ... | ALGO | 0.999983 | 3.865267 |
bcc0c158-2f96-4658-a4e2-9fbe12ca9b44 | matoilic/thesis | Libraries/opencv/samples/cpp/calibration.cpp | #include "opencv2/core/core.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <cctype>
#include <stdio.h>
#include <string.h>
#include <time.h>
using namespace cv;
using namespace std;
const char * usage =
" \nexample command line for c... | TOOL | 0.94018 | 5.790192 |
9b0fa9c6-4de4-4c5f-85b1-95c8de5e6c4d | Shivika-Rawat/practice-codes | targetSum.cpp | //Find the total number of pairs in the array whose sum is equal to the given value x.
#include<iostream>
using namespace std;
int main(){
int arr[]={3,4,6,7,1,5,2};
int targetSum=7;
int size=7;
int pairs=0;
for(int i=0;i<size;i++){
for(int j=i+1;j<size;j++){
if(arr[i]+arr[j]==ta... | ALGO | 0.999906 | 5.521351 |
9fa46746-2c8b-4be8-8c26-0dd65dd44277 | riteshkushwaha7/CP | unordered/dora-set.cpp | #include <bits/stdc++.h>
using namespace std;
class Solution {
public:
int gcd(int a, int b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
int operations(int l, int r) {
int operation = 0;
vector<int> nums;
vector<bool> used(r - l + 1, false);
... | ALGO | 0.999917 | 5.725502 |
40f0e458-df28-44b5-9320-7bcb47daca27 | aztecq/Learning-cpp | Exercise/FindMax.cpp | #include <iostream>
using namespace std;
int a, b, c;
int m;
int main() {
cout << "Podaj 3 liczby, rozdzielajac je spacja: :";
cin >> a >> b >> c;
m = a;
if (b > m) m = b;
if (c > m) m = c;
cout << "Najwieksza liczba to: " << m;
//if ((a >= b) && (a >= c))
// cout << "Najwieksza liczba to: " << a;
//els... | ALGO | 0.998484 | 3.928847 |
bd54ccb8-68a4-4040-98b9-0f6ee7ab7068 | NTMyDung/Demo | 181/main.cpp | #include <iostream>
using namespace std;
int demtraidau ( float a[], int n){ //ham dem so luong cac phan tu ke nhau va trai dau nhau
int dem(0);
for( int i=1; i<n; i++){
if( a[i]*a[i+1]<0) dem++;
}
return dem;
}
int main()
{
int n;
float a[10001];
... | ALGO | 0.999771 | 4.153997 |
13b63080-ea8b-4358-a1f5-5e773d4de514 | ssj-gz/Competitive-Programming | adventofcode/2019/day2/day2_part1_solution.cpp | #include <iostream>
#include <vector>
#include <cassert>
using namespace std;
int main()
{
vector<int> program;
int input;
while (true)
{
cin >> input;
program.push_back(input);
assert(cin);
char comma;
cin >> comma;
if (!cin)
break;
... | ALGO | 0.9938 | 3.879565 |
df0f4460-2696-4c04-b387-9fd81f65aa0b | 113bommy/deepmind_codecontests_refine | cpp_source_filter_file/cpp_train_3711_8.cpp | #include <bits/stdc++.h>
using namespace std;
queue<int> q[1100], an;
long long int m, n, a[1110000];
long long int sum;
int main() {
cin >> m;
for (int x = 1; x <= m; x++) {
cin >> a[x];
for (int y = 60; y >= 0; y--) {
if ((a[x] & (1ll << y))) {
q[y].push(x);
break;
}
}
}
... | ALGO | 0.999993 | 3.398113 |
e93cf5b7-2c7f-4e46-95ef-dce12f762576 | quiminbano/cpp_module08 | ex01/Span.cpp | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Span.cpp :+: :+: :+: ... | TOOL | 0.912938 | 4.268707 |
433c3008-a945-4cfc-8f64-0204386118ca | manikanta2901/ubuntu | .history/random/sum_20210323124748.cpp | #include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
string arr[10] = {"0","one","two","three","four","five","six","seven","eight","nine"};
for(int i = a; i < b; i++){
if(i < 10){
cout << arr[i];
}else if(i % 2 == 0){
... | ALGO | 0.999914 | 3.879442 |
9e16dd8e-3bc0-4741-9133-997b5e1bdd50 | pranit-yawalkar/C_plus_plus_practice | Data_structures/Arrays_in_C++/min_max_in_array.cpp | #include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cout<<"Enter the size of array: "<<endl;
cin>>n;
int arr[n];
for (int i = 0; i < n; i++)
{
cin>>arr[i];
}
int maxNo = INT_MIN;
int minNo = INT_MAX;
// for (int i = 0; i < n; i++)
// {
// if (a... | ALGO | 0.999473 | 4.230761 |
dd9d97ba-1b6a-484b-a94e-aaa94ef81de5 | needle-x/VSProjects | 函数对象/04 内建函数对象_算术仿函数.cpp | #include<iostream>
using namespace std;
#include<vector>
#include<functional>//ڽͷļ
//ڽ º
//negate һԪº ȡº
//void test01()
//{
// negate<int>n;
// cout << n(50) << endl;
//}
//
////plus Ԫº ӷ
//void test02()
//{
// plus<int>p;
// cout << p(10,20) << endl;
//}
//
//
//int main()
//{
// test01();
// test02();
// system("pa... | TOOL | 0.93237 | 4.169216 |
2c1bd357-6147-48f0-9710-59c5929a2a4e | MohamedMohamedSaleh/video_player | 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 |
9d017001-150d-4ebe-ba57-2d0b3741b544 | THA-chain/tha | src/test/argsman_tests.cpp | #include <common/args.h>
#include <sync.h>
#include <test/util/logging.h>
#include <test/util/setup_common.h>
#include <test/util/str.h>
#include <univalue.h>
#include <util/chaintype.h>
#include <util/fs.h>
#include <util/strencodings.h>
#include <array>
#include <optional>
#include <cstdint>
#include <cstring>
#incl... | TEST | 0.939846 | 3.098901 |
67d1789c-763a-4419-bbfb-1f932ba4ef23 | the-toto/data-structure | binary_tree/Creation/create_tree.cpp | #include <iostream>
#include <cstdlib> // creation of a binary by an arr[] and some basic operation
#include <time.h>
using namespace std;
typedef struct node {
int data;
struct node *left;
struct node *right;
}node;
node *newnode(int item) { // creating new node to for insertion
node *pt... | ALGO | 0.999854 | 4.580975 |
75d8cb08-e083-4f73-81ae-d56a9cdad7fa | cg-tuwien/StatMC-opencv_contrib | modules/ximgproc/src/edge_drawing.cpp | #include "precomp.hpp"
#include "edge_drawing_common.hpp"
using namespace std;
namespace cv
{
namespace ximgproc
{
struct ComputeGradientBody : ParallelLoopBody
{
void operator() (const Range& range) const CV_OVERRIDE;
Mat_<uchar> src;
mutable Mat_<ushort> gradImage;
mutable Mat_<uchar> dirImage;
int gradThresh;
in... | ALGO | 0.999119 | 6.55862 |
e63190fa-e6b1-4ef9-9f6a-afb16fb280ea | davdleet/algorithms-practice | BOJ/1167/A.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int N;
vector<pair<int, int>> temp;
vector<vector<pair<int, int>>> arr;
vector<int> visited;
pair<int, int> DFS(int node, int cost)
{
visited[node] = true;
int furthest = node;
int f_cost = 0;
// select the furthest unvisi... | ALGO | 0.999621 | 4.021431 |
5aa50abb-a669-4008-9a3b-4bbf00adc938 | ishandutta2007/codeforces | i_love_tanya_romanova/normal/1383/B.cpp | /*
Yeah!
Grown from a seed of hope I've never known
Been raised by the surroundings of a home so cold, so cold
If I only knew what I know
I'll shake my fist up to the sky
Just keeping my dreams alive
I'm one part saint and two part sinner,
And the last part is still on the line
We pray even when we know nobody cares,... | ALGO | 0.999576 | 3.711794 |
1b7dde28-d1b1-4709-9db6-f7bb0537d9c7 | kristofe/GameEngine | SupportLibraries/bullet-2.82/Demos/MultiThreadedDemo/MultiThreadedDemo.cpp | #define USE_PARALLEL_SOLVER 1 //experimental parallel solver
#define USE_PARALLEL_DISPATCHER 1
#include "btBulletDynamicsCommon.h"
#include "BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h"
#include "BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h"
#include "BulletCollision/... | ALGO | 0.938292 | 5.20165 |
9a9a634b-9044-4ca5-a242-57e0a7756554 | seclab-fudan/SyzDirect | source/llvm-project-new/llvm/lib/CodeGen/LatencyPriorityQueue.cpp | #include "llvm/CodeGen/LatencyPriorityQueue.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
#define DEBUG_TYPE "scheduler"
bool latency_sort::operator()(const SUnit *LHS, const SUnit *RHS) const {
// The isScheduleHigh flag allows n... | ALGO | 0.967398 | 7.536067 |
ceef792d-0d86-43b8-ba00-3faa49e48381 | fahimshahariar09/models_practice | 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 |
6edeb2f5-0faf-4c4b-bca9-e26f5bac6974 | openharmony/sensors_sensor | vibration_convert/core/algorithm/conversion/src/conversion_fft.cpp | #include "conversion_fft.h"
#include "sensor_log.h"
#include "sensors_errors.h"
#include "utils.h"
#undef LOG_TAG
#define LOG_TAG "ConversionFFT"
namespace OHOS {
namespace Sensors {
namespace {
constexpr int32_t SPECTRUM_COUNT_MAX { 8192 };
constexpr int32_t MAX_FFT_SIZE { 10240 };
} // namespace
int32_t Conversio... | ALGO | 0.994662 | 6.396165 |
b5b83a2f-8d5a-4d10-9762-2f5fe165d650 | HawDinh/CodePTIT | Code_CPP/snttongN.cpp | #include <iostream>
#include <algorithm>
#include <map>
#include <cmath>
#include <string>
#include <iomanip>
using namespace std;
using ll = long long;
int nt(int n){
if (n<2) return 0;
for (int i=2;i<=sqrt(n);i++){
if (n%i==0) return 0;
} return 1;
}
int main(){
int t; cin >> t;
while (... | ALGO | 0.999936 | 4.259893 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.