uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
b38cb59d-b801-40ad-9e9e-4eb02c9c1767 | zhumj/Android_Native_Surface | my_libhv/http/http_content.cpp | #include "http_content.h"
#include "hurl.h"
#include <string.h>
BEGIN_NAMESPACE_HV
std::string dump_query_params(const QueryParams& query_params) {
std::string query_string;
for (auto& pair : query_params) {
if (query_string.size() != 0) {
query_string += '&';
}
query_str... | WEB | 0.946562 | 4.763077 |
e2fdb4b6-933b-4ab4-b496-2c5411b4c6bc | Ravit436/Personal-Code-Practice | 5linkedListInsert.cpp | #include<bits/stdc++.h>
using namespace std;
struct Node{
int data;
struct Node *next;
};
struct Node *insertEnd(int value){
struct Node *node = (struct Node*)malloc(sizeof(struct Node));
node->data = value;
node->next = NULL;
return node;
}
void insertStart(struct Node **head, int value){
... | ALGO | 0.999962 | 3.557602 |
09a22f8a-47e5-4199-be3f-5cfd60e73091 | hjiang13/LLMs-in-IR | POJ-104/66/1488.cpp | #include <iostream>
using namespace std;
int number_of_leap_years(int yr, int mth, int day);
int main()
{
int i=0;
char dayName[8][5]={
"Mon.","Tue.","Wed.","Thu.","Fri.","Sat.","Sun."}
;
int daysInMonth[13] = {
0,31,28, 31,30,31,30,31,31,30,31,30,31}
;
long long inputYear=0, inputMonth =0, inputDay=0;
long totalDay=0;... | ALGO | 0.999901 | 3.565697 |
d50da91d-10fd-44c9-9410-166c6720469f | rohan-5783/DSA-CPP | Chapter - Nested If Else/MiNThreeNumber.cpp | #include <iostream>
using namespace std;
int main()
{
int a, b, c;
cout << "Enter three numbers: ";
cin >> a >> b >> c;
if (a <= b)
{
if (a <= c)
{
cout << "Minimum: " << a << endl;
}
else
{
cout << "Minimum: " << c << endl;
}
}
else
{
... | ALGO | 0.999856 | 4.152633 |
5b4c00ea-9167-4327-8ba4-96d99b3b3180 | rNdm74/ADS | charlal1_binary_search_tree/charlal1_binary_search_tree/BinarySearchTree.cpp | #include "StdAfx.h"
#include "BinarySearchTree.h"
BinarySearchTree::BinarySearchTree()
{
rootNode = gcnew BinaryTreeNode("0");
}
BinarySearchTree::BinarySearchTree(String^ rootValue)
{
rootNode = gcnew BinaryTreeNode(rootValue);
}
BinarySearchTree::BinarySearchTree(String^ rootValue, BinaryTree^ leftSubTree, Binar... | ALGO | 0.998801 | 5.021295 |
65873307-8966-409c-be2a-d9ecb4d14038 | bioyoshoo/atcoder | ABC/265/b.cpp | #include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (n); i++)
int main() {
int N, M, T; cin >> N >> M >> T;
vector<ll> A(N - 1);
rep(i, N - 1) cin >> A[i];
map<ll, ll> mp;
rep(i, M) {
ll x,... | ALGO | 0.999997 | 6.25035 |
0012dbc7-c4a1-4769-aca0-748c8ca6b132 | luanaamorim04/lib-lgm | cses/sorting_and_searching/room_allocation.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
typedef long long ll;
typedef vector<int> v... | ALGO | 0.999992 | 4.254573 |
eb45ebee-4c6f-4561-854d-6724ea56042a | CTStudyGroup/BOJ | _sungyoon/1303.cpp | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
typedef long long ll;
#define endl "\n"
#define MAX 1e9
struct coordinate {
int x;
int y;
};
int dx[] = {-1 ,1, 0, 0, -1, -1, 1, 1};
int dy[] = {0, 0, -1, 1, -1, 1, -1, 1};
char graph[101][101];
bool visited[101][101];
int N, M, result1... | ALGO | 0.999858 | 4.587382 |
441dc32d-2c8a-43c5-984a-285a8b49094f | terminatorx0x0/C-and-CPP | SSI Assignments/primeBetweenTwoNumber.cpp | #include<iostream>
using namespace std;
int main()
{
int i,j,m,f,l;
cout<<"enter the first and last number respectively:"<<endl;
cin>>f>>l;
for(i=f;i<=l;i++)
{
m=0;
for(j=2;j<=f/2;j++)
{
if(i%j==0)
{
m++;
break;
... | ALGO | 0.99983 | 3.27234 |
2e8ca859-0fe8-4f18-9dcf-ad5e444f7fe3 | jqzhangiii/Algorithm-Template-For-OI | Data Structure/Splay.cpp | #include<bits/stdc++.h>
using namespace std;
#define FO(x) {freopen(#x".in","r",stdin);freopen(#x".out","w",stdout);}
namespace SplayTree {
int sz,i,n,root;
int f[100003],ch[100003][5],size[100003],cnt[100003],key[100003];
void clear(int x)
{
f[x]=ch[x][0]=ch[x][1]=size[x]=cnt[x]=key[x]=0;
}
... | ALGO | 0.999818 | 4.006835 |
8d12cba6-f67b-4393-847b-cdf67cf32fd0 | YuWeihung/LeetCode | backtracking/78_子集_medium.cpp | /*
* @lc app=leetcode.cn id=78 lang=cpp
*
* [78] 子集
*/
#include <vector>
using namespace std;
// @lc code=start
class Solution {
public:
vector<vector<int>> ans;
void dfs(int i, int n, vector<int> &nums, vector<int> &path) {
if (i == n) {
ans.push_back(path);
return;
... | ALGO | 0.999332 | 6.503731 |
264a6333-c6d9-4b87-97d7-5b6fe9caf5f3 | WilliamDCGomes/exercicios-do-uri-online-judge | Feitos em C++/1052.cpp | #include <iostream>
#include<stdio.h>
using namespace std;
int main(){
int i;
cin>>i;
if(i==1){
cout<<"January"<<endl;
}
else if(i==2){
cout<<"February"<<endl;
}
else if(i==3){
cout<<"March"<<endl;
}
else if(i==4){
cout<<"April"<<endl;
}
else if(i==5){
cout<<"May"<<endl;
}
else if(i==6){
cout<<... | ALGO | 0.998954 | 3.234737 |
295c86b7-b151-4252-9f59-ee45be1208f2 | arundberget/CSE100 | Lab06/arundberget.cpp | #include <iostream>
using namespace std;
void countSort(int list[][10], int size, int pos) {
int count[4] = {0}; // count array to store digits
int output[size][10]; // temp array
for (int i = 0; i < size; i++) {
int digit = list[i][pos];
count[digit]++;
}
for (int i = 1; i < 4; ... | ALGO | 0.999902 | 5.296702 |
eaef498a-55b7-4280-8a41-aac277711246 | devCharlieP/PS_Baekjoon | 11724/소스.cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <cmath>
#define endl '\n'
using namespace std;
int N, M;
int cnt = 1;
vector<int> graph[1001];
vector <int> ch(1001);
void dfs(int L)
{
for (int i = 0; i < graph[L].size(); i++)
{
if (ch[graph[L][i]] == 0)
{
ch[graph[L][i]]... | ALGO | 0.999662 | 4.487132 |
f71dcf35-204c-4e80-9713-a7a93b9d9db8 | Acephoeni-X/Data-Structures-And-Algorithms | Linked Lists/Doubly Linked List/insertion_beginning.cpp | #include<iostream>
using namespace std;
struct Node{
int data;
Node* prev;
Node* next;
Node(int x){
data = x;
prev = NULL;
next = NULL;
}
};
Node* insertBeg(Node*head, int x){
Node* temp = new Node(x);
if(head == NULL)
return temp;
temp->next = head;
head->prev = temp;
return temp;
}
int main(){
N... | ALGO | 0.999101 | 4.399096 |
a782b4df-0330-4274-aef8-7b016078f9c3 | ravigod22/CompetitiveProgrammingUNI | Codeforces/2014/d.cpp | #include <bits/stdc++.h>
using namespace std;
#define dbg(x) cerr << #x << " = " << x << endl
#define pv(x) cerr << #x << "[]: "; for (auto e : x) cerr << e << " "; cerr << endl
#define raya cerr << string(20, '=') << endl
void solve() {
int n, d, k; cin >> n >> d >> k;
vector<pair<int, int>> in;
vector<p... | ALGO | 0.999887 | 4.336297 |
835e0e4f-f7d4-4b65-80d3-31060a4a616b | shuaibu-shehu/DSA- | c++/pointer/stack impll.cpp | #include <iostream>
#include <vector>
#include <string>
class Stack {
private:
std::vector<std::string> data;
public:
void push(std::string value) {
data.push_back(value);
}
void pop() {
if (!data.empty()) {
data.pop_back();
} else {
std::cout << "Stack... | TOOL | 0.964495 | 6.566408 |
fc7c0367-71ee-4f83-ad2c-c990c20763bb | ondryaso/leoAtFit2 | 0ZS/GAL/Projekt/OGDF/src/ogdf/upward/DominanceLayout.cpp | #include <ogdf/upward/DominanceLayout.h>
#include <ogdf/basic/simple_graph_alg.h>
namespace ogdf {
void DominanceLayout::call(GraphAttributes &GA)
{
if (GA.constGraph().numberOfNodes() <= 1)
return;
OGDF_ASSERT(isSimpleUndirected(GA.constGraph()));
//call upward planarizer
UpwardPlanRep UPR;
UPR.createEmpty(G... | ALGO | 0.999829 | 6.381654 |
94796a39-c1f4-44d4-8ff6-873b69fe27b5 | JaeWonJin/algorithm | 집합의 표현(1717)/집합의 표현(1717)/소스.cpp | #include <iostream>
using namespace std;
int parent[1000001];
int find(int curr) {
if (parent[curr] == -1) return curr;
parent[curr] = find(parent[curr]);
return parent[curr];
}
void Union(int a, int b) {
int root1 = find(a);
int root2 = find(b);
if (root1 == root2) {
return;
}
if (root2 > root1) {
in... | ALGO | 0.999992 | 4.734693 |
ff9c9726-5e91-4f06-9a46-481389ecda5a | 8bit-nyk/HSLAM | Thirdparty/opencv-3.4.6/samples/cpp/tutorial_code/Histograms_Matching/calcHist_Demo.cpp | /**
* @function calcHist_Demo.cpp
* @brief Demo code to use the function calcHist
* @author
*/
#include "opencv2/highgui.hpp"
#include "opencv2/imgcodecs.hpp"
#include "opencv2/imgproc.hpp"
#include <iostream>
using namespace std;
using namespace cv;
/**
* @function main
*/
int main(int argc, char** argv)
{
... | ALGO | 0.915221 | 6.7501 |
b2038572-80e0-403f-9751-6ddaecd5447c | by-student-2017/lammps-stable_29Sep2021 | lib/gpu/lal_coul_dsf_ext.cpp | /***************************************************************************
coul_dsf_ext.cpp
-------------------
Trung Dac Nguyen (ORNL)
Functions for LAMMPS access to coul/dsf acceleration routines.
__________________________... | ALGO | 0.932384 | 5.670385 |
632e975a-4c4c-4e7d-a7b4-caa4b0e94560 | SkySlayer/functionflow | benchmark/canny/tbb/canny_edge_detector.cpp | /**
* \file canny_edge_detector.cpp
* \brief Canny algorithm class file.
* \details This file is part of student project. Some parts of code may be
* influenced by various examples found on internet.
* \author sherryshare
*/
#include <math.h>
#include "canny_edge_detector.h"
CannyEdgeD... | ALGO | 0.996806 | 6.878558 |
959cf955-fd6f-482f-b110-c756cc928720 | side-projects-all/works | Leetcodes/array/q_3467.cpp | /*
You are given an integer array nums. Transform nums by performing the following operations in the exact order specified:
Replace each even number with 0.
Replace each odd numbers with 1.
Sort the modified array in non-decreasing order.
Return the resulting array after performing these operations.
Exam... | ALGO | 0.999994 | 6.099341 |
b9767044-bec7-428b-938c-35cea338d9fc | xingfeng2010/OpenGL_ES_3.0 | app/src/main/cpp/src/BulletCollision/CollisionShapes/btConvexHullShape.cpp | #if defined(_WIN32) || defined(__i386__)
#define BT_USE_SSE_IN_API
#endif
#include "btConvexHullShape.h"
#include "BulletCollision/CollisionShapes/btCollisionMargin.h"
#include "LinearMath/btQuaternion.h"
#include "LinearMath/btSerializer.h"
#include "btConvexPolyhedron.h"
#include "LinearMath/btConvexHullComputer.h"... | ALGO | 0.994226 | 7.660881 |
80e6e519-fc32-4fb4-89a0-85f685cbcd96 | shitesh2607/dsa | array/maximum product of three number.cpp | #include <bits/stdc++.h>
using namespace std;
class Solution {
public:
int maxProduct(vector<int>& nums){
int max1 = INT_MIN;
int max2 = max1;
int max3 = max2;
int min1= INT_MAX;
int min2 = min1;
for(int i=0;i<nums.size();i++){
int val = ... | ALGO | 0.999944 | 5.536991 |
6df0c3f1-1025-44a4-860e-e79b2cbc4597 | Sakura-12/PyLammps | src/MOLECULE/dihedral_harmonic.cpp | /* ----------------------------------------------------------------------
Contributing author: Paul Crozier (SNL)
------------------------------------------------------------------------- */
#include "dihedral_harmonic.h"
#include <mpi.h>
#include <cmath>
#include "atom.h"
#include "comm.h"
#include "neighbor.h"
#i... | ALGO | 0.995 | 6.6827 |
ed32e5c9-3169-442b-a958-20730277c9d9 | SAP/project-foxhound | gfx/thebes/gfxPlatformMac.cpp | #include "gfxPlatformMac.h"
#include "gfxQuartzSurface.h"
#include "mozilla/DataMutex.h"
#include "mozilla/gfx/2D.h"
#include "gfxMacFont.h"
#include "gfxCoreTextShaper.h"
#include "gfxTextRun.h"
#include "gfxUserFontSet.h"
#include "gfxConfig.h"
#include "AppleUtils.h"
#include "nsTArray.h"
#include "mozilla/Prefer... | TOOL | 0.885807 | 6.905534 |
4326b93c-d8c8-4f98-98c2-d6235fd65511 | clxxrlove/algorithm-study-cpp | 14502/main.cpp | //
// main.cpp
// 14502
//
// Created by 정지용 on 3/4/25.
//
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
using namespace std;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using ii = pair<int, int>;
int n, m;
int dx[] = {0, 1, 0, -1};
int dy[] = {1, 0, -1, 0};
void setDef... | ALGO | 0.999461 | 5.319519 |
87741c8a-243f-467d-8b2a-54d625f37138 | u-noob-i/contest | Kickstart/round A 2022/C.cpp | #include <iostream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <utility>
#include <algorithm>
#include <math.h>
#include <numeric>
#include <queue>
using namespace std;
int n, m, i, j;
bool dun;
int calc[100001];
void printans(int ans, int t)
{
cout << "Case #" << t << ": " << an... | ALGO | 0.999415 | 4.909066 |
0f5e82ab-8069-4c94-ba2a-e27126d989dc | arif-z04/Competitive-Programming | Binary Search/contest/B_Coins_And_Triangle.cpp |
#include <bits/stdc++.h>
using namespace std;
using i64 = long long int;
using ui64 = unsigned long long int;
i64 getHeight(i64 coins){
i64 n = (i64)((-1 + sqrt(1 + 8 * coins)) / 2);
return n;
}
int main(){
int test;
cin >> test;
while(test--){
i64 n;
cin >> n;
ui64 ... | ALGO | 0.999624 | 4.668815 |
ec2f6d64-5e8e-4697-96d9-7b43af6a97cd | ayuwusshh/Code-Base | Striver/hashing/NumberHashing.cpp | #include<iostream>
using namespace std;
int main(){
int n;
cout<<"Enter number of elements ";
cin>>n;
int arr[n];
cout<<"Enter elements ";
for(int i=0;i<n;i++){
cin>>arr[i];
}
int hash[13]={0};
for(int i=0;i<n;i++){
hash[arr[i]]+=1;
}
cout << "Frequency of eac... | ALGO | 0.998833 | 3.511127 |
abb496fb-d6ba-4dbd-a30d-bd4152700f45 | malladi2610/DSA_practice_repo | 7.Array_problems/12. Maximum_consecutive_ones/problem_12.cpp | #include<iostream>
#include<bits/stdc++.h>
using namespace std;
int consecutive_ones(vector<int> &nums){
vector<int> counter_storage;
int counter = 0;
if(nums.size() == 1 ){
if(nums[0] ==1){
cout<<"The maximum consecutive ones = "<<counter+1;
return 0;
}
else{
... | ALGO | 0.999826 | 5.096356 |
54e445b4-fb08-442b-a026-a530c0015e28 | chffy/ACM-ICPC | topcoder/some-easy-problem/srm466.cpp | #include <iostream>
#include <cstdio>
#include <cstring>
#include <vector>
#include <queue>
#include <map>
#include <algorithm>
#include <set>
using namespace std;
typedef long long LL;
int deal(LL x, string ID) {
int n = ID.size();
int ans = 0;
for (int i = 0; i < n; ++i) {
ans += (((LL)ID[i] - '... | ALGO | 0.998962 | 4.344048 |
15506ded-7b26-43cf-b4e5-6c82dc1c63b7 | amuze10/sabak22_weather_app_data | 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 |
8afdc32c-b81f-40e7-b521-b052ee5974f6 | GUENTIGER/Guen_beginner_project | C++/selectionsort.cpp | /* thuật toán selection sort:
*** Sắp xếp chọn là một trong những thuật toán đơn giản. Nó thực hiện công việc so sánh các phần tử trong danh sách.
Danh sách chứa các phần tử sẽ được chia làm hai phần. Phần ở bên trái là phần được sắp xếp (sort list) và phần ở bên phải là phần chưa được sắp xếp (unsorted list).
Ban đầu ... | ALGO | 0.99998 | 4.631583 |
0fc465ea-a172-43d6-85ee-4a30dc65d4fe | ashgen/Greeks | extern/dlib/examples/custom_trainer_ex.cpp | /*
This example program shows you how to create your own custom binary classification
trainer object and use it with the multiclass classification tools in the dlib C++
library. This example assumes you have already become familiar with the concepts
introduced in the multiclass_classification_ex.cpp ex... | DATA | 0.855518 | 7.83565 |
acec99f6-6a9d-428c-aa75-7d895bf963c2 | Shivika-Rawat/practice-codes | llTwoLLEqualOrNot.cpp | //Given two linked list tell if they are equal or not. Two link lists are equally if they have the same data and the arrangement of data is also the same..
#include<iostream>
using namespace std;
class Node{
public:
int val;
Node* next;
Node(int data){
val=data;
next=NULL;
}
};
cla... | ALGO | 0.999882 | 5.362724 |
f29729e7-774e-4ccf-8ebb-8a2a2b974f9c | mongodb-labs/pubsub | src/mongo/db/pubsub.cpp | #include "mongo/pch.h"
#include "mongo/db/pubsub.h"
#include <time.h>
#include <zmq.hpp>
#include "mongo/db/pubsub_sendsock.h"
#include "mongo/db/server_options_helpers.h"
#include "mongo/db/server_parameters.h"
namespace mongo {
MONGO_EXPORT_SERVER_PARAMETER(useDebugTimeout, bool, false);
namespace {
... | TOOL | 0.903774 | 6.932574 |
507b53a5-3a49-44c2-af4a-1ced3f070a51 | Adarsh-kumar/Competitive_coding_practice | chef.cpp | #include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define N 1000
long long arr[100000];
long long glove[100000];
int main()
{
int t,n,f_count,b_count;
cin>>t;
while(t)
{
f_count=0,b_count=0;
cin>>n;
for(int i=0;i<n;i++)
cin>>arr[i];
for(int i=0;i<n;i++)
cin>>glove[i];
for(int i=0;i<n;i++)
{
if(arr[i]<... | ALGO | 0.999958 | 3.622402 |
18612f2c-6a45-4d01-9170-248aed4b4a0d | yyisk/hello | codes/cpp/chapter_sorting/heap_sort.cpp | /**
* File: heap_sort.cpp
* Created Time: 2023-05-26
* Author: Krahets (<EMAIL>)
*/
#include "../utils/common.hpp"
/* 堆的长度为 n ,从节点 i 开始,从顶至底堆化 */
void siftDown(vector<int> &nums, int n, int i) {
while (true) {
// 判断节点 i, l, r 中值最大的节点,记为 ma
int l = 2 * i + 1;
int r = 2 * i + 2;
... | ALGO | 0.999986 | 5.408848 |
18ea8493-c2f9-403f-b54f-7f9d5bbb1121 | nishitkshah/My-Codeforces-Submissions | Contests/CF009_494_D3/D/1003D_1.cpp | //20:56 03-07-2018
//21:06 03-07-2018
#include<iostream>
#include<algorithm>
using namespace std;
#define RE(a, b, c) for(int a=(b); a<(c); a++)
#define IA(a, i, x, y) for(int i=(x); i<(y); i++) cin >> a[i];
int n, q, do[31]={0}, a, b, d[31];
int bcnt(int a){
int b=0;
while(a){
b++;
a = a>>1;
}
return b;
}... | ALGO | 0.999818 | 3.821643 |
42774bc4-4bc2-4b3d-870c-e1281f7b4e9d | cookie-sid/LeetCode | median-of-two-sorted-arrays/median-of-two-sorted-arrays.cpp | class Solution {
public:
double findMedianSortedArrays(vector<int>& nums1, vector<int>& nums2) {
int n = nums1.size(), m = nums2.size();
if(n > m) {
return findMedianSortedArrays(nums2,nums1);
}
int low = 0;
int high = n;
int combined = n + m;
... | ALGO | 0.999994 | 6.14181 |
e6f11a59-cc89-4098-990d-7a5d27283d1d | SuvekT/GFG-and-Leetcode | 152-maximum-product-subarray/152-maximum-product-subarray.cpp | class Solution {
public:
int maxProduct(vector<int>& nums) {
if(nums.size()==0)
return 0;
if(nums.size()==1)
return nums[0];
int ans=nums[0];
int ma=ans;
int mi=ans;
for(int i=1;i<nums.size();i++){
if(nums[i]<0){
swap(ma,mi);
}
... | ALGO | 0.999986 | 5.871178 |
74dcec01-1485-4ce7-985d-8396f0c1f74b | fepaf/Competitive-Programming | Resoluções OJ/uri/1910 - Ajude Clotilde.cpp | // Autor: [GAPA] Francisco Arcos Filho<<EMAIL>>
// Nome: Ajude Clotilde
// Nível: 4
// Categoria: GRAFOS
// URL: https://www.urionlinejudge.com.br/judge/pt/problems/view/1910
#include<bits/stdc++.h>
#define maxn 1000123
#define forbiden -1
#define zerar(v,n) for (i=n;i--;) v[i]=0;
using namespace std;
int est[maxn],... | ALGO | 0.999729 | 3.422689 |
62019b33-74e2-461b-9b75-a8468497df4d | Jopie64/tortoisegit | ext/OGDF/src/planarity/PlanRepExpansion.cpp | /*
* $Revision: 2599 $
*
* last checkin:
* $Author: chimani $
* $Date: 2012-07-15 22:39:24 +0200 (So, 15. Jul 2012) $
***************************************************************/
#include <ogdf/planarity/PlanRepExpansion.h>
#include <ogdf/basic/simple_graph_alg.h>
#include <ogdf/basic/extended_graph_alg.... | ALGO | 0.996987 | 6.748453 |
6cc31e24-7878-4373-aa1f-f8e847805f6c | corelab-src/DuroHLS-llvm | llvm/lib/CodeGen/RegAllocBasic.cpp | #include "AllocationOrder.h"
#include "LiveDebugVariables.h"
#include "RegAllocBase.h"
#include "Spiller.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/CodeGen/CalcSpillWeights.h"
#include "llvm/CodeGen/LiveIntervals.h"
#include "llvm/CodeGen/LiveRangeEdit.h"
#include "llvm/CodeGen/LiveRegMatrix.h"
#include... | ALGO | 0.93024 | 7.841341 |
ea97c151-7092-47b5-a614-8f8c1054981d | ABB00717/leetcode | problems/cpp/2115.find-all-possible-recipes-from-given-supplies.cpp | /*
* @lc app=leetcode id=2115 lang=cpp
*
* [2115] Find All Possible Recipes from Given Supplies
*/
// @lc code=start
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
class Solution {
public:
vector<string> findAllRecipes(
vector<string>& recipes,
... | ALGO | 0.999908 | 6.752083 |
0c74d146-d192-40a5-985b-ed60e361e0d5 | Exgibichi/neko_tmp | src/checkpoints.cpp | #include "checkpoints.h"
#include "chainparams.h"
#include "key.h"
#include "main.h"
#include "pubkey.h"
#include "timedata.h"
#include "txdb.h"
#include "uint256.h"
#include <stdint.h>
#include <boost/foreach.hpp>
/** Synchronized checkpoint public key */
std::string strMasterPubKey = "";
namespace Checkpoints {
... | TOOL | 0.954251 | 5.886357 |
d4be0139-81da-4627-9c75-0b8b488524ee | RomanBapst/PX4_ROS_shared_lib | fw_att_controller/include/fw_att_controller/eigen/doc/snippets/MatrixBase_part.cpp | #ifndef _MSC_VER
#warning deprecated
#endif
/*
Matrix3d m = Matrix3d::Zero();
m.part<Eigen::StrictlyUpperTriangular>().setOnes();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "And let us now compute m*m.adjoint() in a very optimized way" << endl
<< "taking advantage of the symmetry." << endl;
Ma... | ALGO | 0.988144 | 3.205996 |
e44af81a-86c9-4801-bae3-66c2fecf0d26 | marine5575/BOJ | 6549 히스토그램에서 가장 큰 직사각형_new.cpp | /*
seg tree 크기를 좀더 적게 잡음
*/
#include <iostream>
#define INF 1000000001
using namespace std;
typedef long long ll;
typedef struct point {
int idx;
ll v = INF;
} pt;
pt tree[205001]; // seg tree
int n; // input 수
ll maxi; // 최댓값
int query(int i, int j) {
int min = INF, idx = -1; // 최솟값, 그의 index
// 시작은 끝보다 ... | ALGO | 0.999974 | 4.577921 |
17684827-778d-4125-b705-4275f6fe595f | AtharvaBirari7/Sem-5 | New folder/A/memory management/FIRST_FIT/First_fit.cpp | #include<iostream>
using namespace std;
int main()
{
cout<<"\n\n-----FIRST FIT-----"<<endl;
cout<<"Enter total number of processes"<<endl;
int n;
cin>>n;
cout<<"Enter total number of partitions"<<endl;
int pn;
cin>>pn;
string pr[n];
int size[n];
int block[n];
int partion[pn];
string fit[pn];
int a... | ALGO | 0.99986 | 3.068253 |
44b996bf-b828-4961-8f35-01e72db7c54d | zerolxf/zero | zhuanti/shuweidp/j.cpp | #include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <string>
#include <queue>
#include <cstdlib>
#include <algorithm>
#include <stack>
#include <map>
#include <queue>
#include <vector>
using namespace std;
const int maxn = 2e5+100;
const int INF = 0x3f3f3f3f;
#define pr(x) cout << ... | ALGO | 0.999538 | 4.133272 |
12094c78-fe51-4784-b541-8708420b831e | wastegas/CPP-Primer | src/ch04/ex4.22.cpp | #include <iostream>
using std::cout; using std::endl;
using std::cin;
int main()
{
int grade = 0;
cin >> grade;
// part 1 conditional operators
cout << ((grade > 90) ? "high pass" :
(grade <= 90 && grade > 75) ? "pass" :
(grade >= 60 && grade <=75 ) ? "low pass" : "fail");
cout << endl;
// part ... | TOOL | 0.946286 | 4.017199 |
4fa9ae94-398a-4bda-96c5-35e0573731b9 | tec-csf/tc2017-t4-otono-2019-sebastianmed | grafos-exp/testgraph.cpp | #include <fstream>
#include <iomanip>
#include <locale>
#include <time.h>
#include <vector>
#include <sstream>
#include <string>
#include <iostream>
#include "Snap.h"
#include "GraphSon.h"
using namespace TSnap;
using namespace std;
class Visitor {
private:
vector<int> nodos;
public:
Visitor() { }
Visitor(con... | ALGO | 0.953022 | 4.107024 |
99f2ebc8-adbb-4119-a8f8-0023749b144d | Javivi-MR/EDNL | Arboles/Arboles Parcialmente Ordenados/P5/ejercicio4.cpp | #include <iostream>
#include "agen.hpp"
#include "agen_E-S.h"
typedef char tElto;
const tElto fin = '#';
bool ternario(Agen<char>& A);
bool ternarioRec(Agen<char>& A, Agen<char>::nodo n);
int contarnodosRec(Agen<char>& A, Agen<char>::nodo n);
int main()
{
Agen<char> A;
rellenarAgen(A,fin);
bool result... | ALGO | 0.995159 | 4.480998 |
44161507-1cc5-42b0-9df5-0e7785544a1a | baheytharwat/selfdrivingcar-nd | CarND-Kidnapped-Vehicle-Project/src/particle_filter.cpp | /**
* particle_filter.cpp
*
* Created on: Dec 12, 2016
* Author: Tiffany Huang
*/
#include "particle_filter.h"
#include <math.h>
#include <algorithm>
#include <iostream>
#include <iterator>
#include <numeric>
#include <random>
#include <string>
#include <vector>
#include "helper_functions.h"
using std::string;... | ALGO | 0.993692 | 5.120639 |
2234889b-0981-4485-ac27-0637e6aa9037 | AA961/pf-paper-solution | Question#11.cpp | #include <iostream>
using namespace std;
int displyNumber(int n)
{
if (n == 0)
{
return 1;
}
cout << n << endl;
return displyNumber(n - 1);
}
int main()
{
int number;
cout << "Enter A Number :";
cin >> number;
displyNumber(number);
} | ALGO | 0.998541 | 4.593203 |
7bb9ea5c-ed7a-43ed-b659-5a56b85c765b | SingularDuo/C-COMPETITIVE-TRAINING | sorting_&_searching/Concert_Tickets.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n, m;
cin >> n >> m;
multiset<int> tickets;
for (int i = 0; i < n; i++) {
int x;
cin >> x;
tickets.insert(x);
}
for (int i = 0; i ... | ALGO | 0.999994 | 4.277296 |
d047a24c-e122-45cd-883a-951fd023dbcc | mckelvym/advanced-programming-in-cplusplus-cs115 | Included_programs/LOGICAL2.CPP | #include<iostream.h>
main()
{
int white, black, friendly, acceptable;
white = 1; // dog is white
black = 0; // dog is not black
friendly = 0; // dog is not friendly
// The following statement produces incorrect results due to the
// order of operations.
acceptable = (white || black && friendly);
cou... | ALGO | 0.97633 | 4.396102 |
def1c3a4-5760-4e25-886d-002c60532259 | uniticn/UnitiCoin | src/zerocoin/Coin.cpp | /**
* @file Coin.cpp
*
* @brief PublicCoin and PrivateCoin classes for the Zerocoin library.
*
* @author Ian Miers, Christina Garman and Matthew Green
* @date June 2013
*
* @copyright Copyright 2013 Ian Miers, Christina Garman and Matthew Green
* @license This project is released under... | TOOL | 0.912098 | 6.296674 |
96554c79-e06b-46d5-9675-6e4b282e2939 | sx-aurora-devold/clang | lib/Driver/Multilib.cpp | #include "clang/Driver/Multilib.h"
#include "clang/Basic/LLVM.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Path.h"
#include "llvm/Supp... | TOOL | 0.874475 | 4.06246 |
d7890496-a376-4a3b-b462-a3689230ff59 | Eyre-S/OICpp | src/main/luogu/+[80] P5019 铺设道路/road-laying.cpp | /**
* __ _____ __ __
* / / / ___/__ __/ /______ _____ __ ______ / /
* / / \__ \/ / / / //_/ __ `/_ / / / / / __ \ / /
* /_/ ___/ / /_/ / ,< / /_/ / / /_/ /_/ / /_/ / /_/
* (_) /____/\__,_/_/|_|\__,_/ /___/\__, /\____/ (_)
* ... | ALGO | 0.999901 | 3.593492 |
055eb710-c60d-4cbf-a0cf-adda22f8fa32 | demondragon07/New-DSA | 3330-modify-the-matrix/modify-the-matrix.cpp | class Solution {
public:
vector<vector<int>> modifiedMatrix(vector<vector<int>>& matrix) {
int n=matrix.size();
int m=matrix[0].size();
vector<int>v;
for(int j=0;j<m;j++){
int maxans=0;
for(int i=0;i<n;i++){
int temp=matrix[i][j];
if... | ALGO | 0.999968 | 5.740737 |
bcb507b6-71ad-4503-9693-a206e1646964 | muranhuli/Finer-Grained-Engagement-in-Hypergraphs | timeOfInsertErase.cpp | #include <iostream>
#include <string>
#include <vector>
#include <fstream>
#include <sstream>
#include <set>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <chrono>
#include <map>
#include <climits>
#include <algorithm>
#include <random>
using namespace std;
typedef pair<... | ALGO | 0.999256 | 4.011927 |
38fd012d-0d32-4c52-aa9c-ff6b64bb8223 | Pavel401/LeetCode-submissions | 1822-sign-of-the-product-of-an-array/1822-sign-of-the-product-of-an-array.cpp | class Solution {
public:
int arraySign(vector<int>& nums) {
int negativeCount = 0;
for (int num : nums) {
if (num == 0) {
return 0;
} else if (num < 0) {
negativeCount++;
}
}
return negativeCount % 2 == 0 ? 1 : -1;
... | ALGO | 0.99999 | 5.934204 |
060db80d-0b51-49ee-804c-acd30c4537de | AvanishShukla20/Leetcode-problems | 3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i/minimum-operations-to-make-binary-array-elements-equal-to-one-i.cpp | class Solution {
public:
int minOperations(vector<int>& nums) {
int n=nums.size(), cnt = 0;
for(int i=0; i<n-2; i++)
{
if(nums[i] == 0)
{
cnt++;
nums[i] = !nums[i];
nums[i+1] = !nums[i+1];
nums[i+2] = !n... | ALGO | 0.999951 | 5.896126 |
19b67055-c55b-4e3e-83b4-abbd02478117 | developeSHG/Algorithm-Baekjoon_Programmers | 프로그래머스/unrated/132265. 롤케이크 자르기/롤케이크 자르기.cpp | #include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <numeric>
using namespace std;
int solution(vector<int> topping) {
map<int, int> a, b;
std::for_each(topping.begin(), topping.end(), [&](const auto& t) { ++b[t]; });
return std::accumulate(topping.begin(), topping.end(),... | ALGO | 0.999476 | 5.582274 |
1c255142-25ce-4838-b3dc-b2efe5f7860d | sarvex/leetcode-zsh | solution/1100-1199/1122.Relative Sort Array/Solution.cpp | class Solution {
public:
vector<int> relativeSortArray(vector<int>& arr1, vector<int>& arr2) {
vector<int> mp(1001);
for (int x : arr1) ++mp[x];
int i = 0;
for (int x : arr2) {
while (mp[x]-- > 0) arr1[i++] = x;
}
for (int j = 0; j < mp.size(); ++j) {
... | ALGO | 0.999995 | 5.662898 |
47078ba2-490f-4b90-aa65-e682328c0a01 | Mihin125/Astrixs-attendance | 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 |
91e56069-8db7-4459-b449-ad7e43ecb952 | GitHub-Sanjit/Basic-Data-Structure | Assignment-4/Max_Min_Leaf.cpp | #include <bits/stdc++.h>
using namespace std;
class Node{
public:
int val;
Node *left;
Node *right;
Node(int val){
this->val = val;
this->left = NULL;
this->right = NULL;
}
};
Node *input_tree(){
int val;
cin >> val;
Node *root;
if (val == -1)
root = ... | ALGO | 0.999872 | 4.780512 |
ab861cda-e971-421b-b1e5-194a5f295fe7 | Omaima-Atif/Data-Structures | 19_MAX_heap.cpp | #include <iostream>
using namespace std;
void insertheap(int array[], int size, int value) {
size = size + 1;
array[size - 1] = value;
int i = size - 1;
while (i > 1) {
int parent = i / 2;
if (array[parent - 1] < array[i - 1]) {
int temp = array[parent - 1];
arra... | ALGO | 0.999879 | 4.560464 |
03d2cbf8-2d22-4557-9ddd-a6eb6b1aed10 | k930503/coding-test | 프로그래머스/2/131127. 할인 행사/할인 행사.cpp | #include <string>
#include <vector>
#include <unordered_map>
using namespace std;
bool check(vector<string>& want, vector<int>& number, unordered_map<string, int>& current) {
for (int i = 0; i < want.size(); i++) {
if (current[want[i]] != number[i]) {
return false;
}
}
return tr... | ALGO | 0.998792 | 5.231996 |
01b5ed17-3b45-40d1-8b36-9fbf4e821b68 | Said1809/ProgrammC- | 1/1-2.cpp | #include <iostream>
#include <queue>
#include <string>
// Структура для хранения информации о процессоре
struct Processor {
std::string name;
double clockSpeed;
int numCores;
};
int main() {
std::queue<Processor> processorQueue;
// Добавляем информацию о нескольких процессорах в очередь
proce... | ALGO | 0.985361 | 6.015403 |
5ba2c8be-6c7d-4777-9be0-b2b172922072 | basedafdev/geometry-processing-cubicstylization | libigl/include/igl/predicates/ear_clipping.cpp | #include <igl/slice.h>
#include "ear_clipping.h"
#include "point_inside_convex_polygon.h"
#include "predicates.h"
template <typename DerivedP, typename DerivedRT,
typename DerivedF, typename DerivedI>
IGL_INLINE void igl::predicates::ear_clipping(
const Eigen::MatrixBase<DerivedP>& P,
const Eigen::Matrix... | ALGO | 0.999218 | 6.756073 |
db7e1c8d-0bd9-4c85-a3ca-e01e474cf44c | fyzel527/UnrealEngine-4.24Toon | Engine/Plugins/Experimental/AlembicImporter/Source/ThirdParty/Alembic/openexr/IlmBase/Imath/ImathFun.cpp | #include "ImathFun.h"
IMATH_INTERNAL_NAMESPACE_SOURCE_ENTER
float
succf (float f)
{
union {float f; int i;} u;
u.f = f;
if ((u.i & 0x7f800000) == 0x7f800000)
{
// Nan or infinity; don't change value.
}
else if (u.i == 0x00000000 || u.i == 0x80000000)
{
// Plus or minus zer... | ALGO | 0.977435 | 7.054082 |
1ebc73ea-bd55-447b-b6c0-030436c61870 | dyon/skcore | src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp | /* ScriptData
SDName: Boss_Jeklik
SD%Complete: 85
SDComment: Problem in finding the right flying batriders for spawning and making them fly.
SDCategory: Zul'Gurub
EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "zulgurub.h"
enum Says
{
SAY_AGGRO = 0,
SAY_RAIN_F... | TOOL | 0.942556 | 3.643372 |
3bc86a58-73d4-4e6d-8c8a-dde07b04d7ec | Ali112358132134/tetris | GUI/gui.cpp | #include <gui.h>
#define GAMEOVER_ROW 2
char well[WIDTH*HEIGHT] = {0};
int random(int min, int max){
int range = max - min;
return(min + (rand() % range));
}
Piece spawn_piece(){
int rs = random(0, 7);
int rc = random(1, 7);
return(create_piece(rs, SCREEN_WIDTH/2, 0, rc));
}
int find_line(p_Game... | ALGO | 0.92117 | 4.137348 |
a718de64-a44d-4083-b3ad-6384c958a372 | Yawn-Sean/Daily_CF_Problems | daily_problems/2024/05/0504/personal_submission/cf1575l_luchy0120.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <iostream>
#include <map>
using namespace std;
int main() {
int n;cin >> n;
int r = 0;
vector<pair<int, int>> v;
for (int i = 1;i <= n;++i) {
int c;cin >> c;
if (c <= i) {
int ck = i-c;
v.push_back({ck, c});
}
}
sort(v.begin(), v.end... | ALGO | 0.999919 | 3.555629 |
1a8e7fe0-8c7b-4fe1-a36b-13535e890413 | MostafaAshraf98/Problem-Solving | Graphs/Leetcode/BFS/AllPathsFromSourcetoTarget.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
#define sf(n) scanf("%d", &n)
#define sff(n, m) scanf("%d%d",&n,&m)
#define sfl(n) scanf("%I64d", &n)
#define sffl(n, m) scanf("%I64d%I64d",&n,&m)
#define sfs(s) scanf("%s",s... | ALGO | 0.999691 | 4.408745 |
3a8bc7b0-acd7-4844-8bdb-2123d8daa8cd | asSqr/AtCoder | ABC211 B.cpp | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>
#include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#define repi(i,a,b) for(ll i=... | ALGO | 0.999677 | 4.429134 |
4e926fa6-0106-491c-bde4-11a0e715bf41 | blenz3/Grind75 | 025_max_depth/solution.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.99997 | 6.972366 |
09269c14-d500-4f44-8dce-a2f58a56a9e3 | VaibhavPagare25/Daily-Flutter | March-05-24/todo_app_advance/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.999012 | 6.76073 |
67fae6f3-4334-4fc5-819a-c4c43a2ac349 | foxliu/CarND-MPC-Project | src/Eigen-3.3/doc/examples/Tutorial_ArrayClass_mult.cpp | #include <Eigen/Dense>
#include <iostream>
using namespace Eigen;
using namespace std;
int main()
{
ArrayXXf a(2,2);
ArrayXXf b(2,2);
a << 1,2,
3,4;
b << 5,6,
7,8;
cout << "a * b = " << endl << a * b << endl;
}
| ALGO | 0.990518 | 3.527115 |
dc60c24e-9ab2-438c-8457-3819b163dfe5 | cshsgy/ExoCubed | tests/transport/test_stream_transport.cpp | // Athena++ headers
#include <athena.hpp>
#undef PI
#undef SQRT2
// IceChem headers
#include <transport/stream_transport.hpp>
void set_boundary_condition(AthenaArray<Real> &data) {
int rowsh = data.GetDim2();
int colsh = data.GetDim1();
int rows = rowsh - 2 * GhostZoneSize;
int cols = colsh - 2 * GhostZoneSiz... | ALGO | 0.994425 | 5.311428 |
39b5e32c-f214-4d93-8c22-d694c4e7014b | Sumedha2/Competitive-Coding | DSA/Recursion/indirect.cpp | #include <iostream>
using namespace std;
// indirect recursion
// has more than one recursive function
// these functions call each other cyclically
// declaring both functions ahead so there is no error
void funb(int n);
void funa(int n);
void funa(int n){
if (n>0){
cout<<n<<" ";
// calls funb
... | ALGO | 0.999947 | 4.794887 |
3467cd65-d760-4f14-ad9b-21274c5caf64 | AlmondLee/llvm_build | clang/test/Analysis/Inputs/ctu-chain.cpp | int h_chain(int x) {
return x * 2;
}
namespace chns {
int chf3(int x);
int chf2(int x) {
return chf3(x);
}
class chcls {
public:
int chf4(int x);
};
int chcls::chf4(int x) {
return x * 3;
}
}
| TOOL | 0.986056 | 4.249734 |
c0b165ec-16b0-40cd-bdb8-3e62e16e68e9 | LaiXuanHieu/LaiXuanHieu_monC | Chapter 6/Programming Challenges/Challenges_13.cpp | #include <iostream>
using namespace std;
// Function to get the number of employees
int getNumEmployees()
{
int numEmployees;
do
{
cout << "Enter the number of employees in the company: ";
cin >> numEmployees;
} while (numEmployees < 1);
return numEmployees;
}
// Function to get th... | TOOL | 0.977882 | 5.498286 |
c5c3e753-cfd8-4f16-8425-a02fdb47ebd9 | Crimson-Coders-3/cs107-FinalProject | 3PL/eigen-3.3.9/doc/examples/Tutorial_ArrayClass_interop.cpp | #include <Eigen/Dense>
#include <iostream>
using namespace Eigen;
using namespace std;
int main()
{
MatrixXf m(2,2);
MatrixXf n(2,2);
MatrixXf result(2,2);
m << 1,2,
3,4;
n << 5,6,
7,8;
result = (m.array() + 4).matrix() * m;
cout << "-- Combination 1: --" << endl << result << endl << e... | ALGO | 0.999468 | 4.531452 |
310503dd-3e17-4c71-81fd-7d5a1076c1e5 | JianpingZeng/llvm-java | examples/ParallelJIT/ParallelJIT.cpp | #include "llvm/ExecutionEngine/GenericValue.h"
#include "llvm/ExecutionEngine/Interpreter.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/TargetSelect.h"
#include <iostream>
#include... | TOOL | 0.962002 | 7.233847 |
5dc08735-b761-49af-839e-4f4e53ecf291 | SnoopyCodes/code | cf/randomq/teambuilding.cpp | #include <bits/stdc++.h>
using std::vector, std::min, std::max;
#define long long long
const int BIG = 1e9 + 1;
const long INF = 4e18 + 1000;
template<size_t z> using ints = std::array<int, z>;
template<size_t z> using longs = std::array<long, z>;
int main() {
std::cin.tie(0) -> sync_with_stdio(0);
int N, P,... | ALGO | 0.99983 | 3.406509 |
937e7e50-e810-404c-b66d-90bba6e38336 | AshishJha30/Practise_Everyday | CheetSheets/Beginner Problems/Loops/Q8_reverse_Number.cpp | #include<iostream>
using namespace std;
int main() {
int n, reversedNumber = 0, remainder;
cout << "Enter the number you want to reverse: ";
cin >> n;
while (n != 0) {
remainder = n % 10;
reversedNumber = reversedNumber*10 + remainder;
n = n / 10;
}
cout << "Reverse... | ALGO | 0.997147 | 4.750062 |
c6ece1af-c6c5-4ccd-8cc5-1304f0a38a94 | Kishore-Nayak/Cpp_DSA | 1-C++/4-Pattern_Printing/solidSquare.cpp | //print the given pattern
// ***
// ***
// ***
#include<iostream>
using namespace std;
int main()
{
int x;
cout<<"Enter the number of rows/columns : ";
cin>>x;
for(int i=0;i<x;i++)
{
for(int j=0;j<x;j++)
{
cout<<"* ";
}
cout<<endl;
}
return 0;
} | ALGO | 0.996935 | 3.473612 |
cdc43488-84b0-4395-abab-28841d500322 | Binagii/C | strcmp.cpp | // C++ to compare two string using strcmp;
#include <iostream>
#include <string.h>
using namespace std;
int main(){
char str1[100], str2[200];
cout << "Enter the first string: "<< endl;
cin >> str1;
cout << "Enter the second string: ";
cin >> str2;
if(strcmp(str1, str2) == 0){
cout... | TOOL | 0.990941 | 4.35177 |
3eeceeb6-3ef0-48ae-9734-571710670fd7 | RafiRasaki/Projectskripsi | imagedetection/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.998946 | 6.76073 |
dadb8c72-d79d-466a-b0cc-b4c159452625 | alexandraback/datacollection | solutions_5644738749267968_0/C++/Kaizero/소스.cpp | #pragma warning(disable:4996)
#include<stdio.h>
#include<algorithm>
using namespace std;
int n;
int a[1010], b[1010], p[1010];
bool v[1010];
int main()
{
int TC, T, i, j, R, R2, pv;
double t;
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
scanf("%d", &TC);
for (T = 1; T <= TC; T++){
print... | ALGO | 0.99919 | 3.317015 |
d50ddf9b-4a50-47a0-96d2-417efc2ee09f | nns503/ProblemSolving_NS_CPP | 프로그래머스/lv1/12906. 같은 숫자는 싫어/같은 숫자는 싫어.cpp | #include <bits/stdc++.h>
using namespace std;
vector<int> solution(vector<int> arr)
{
vector<int> answer;
deque<int> dq;
dq.push_back(arr[0]);
for(auto a : arr){
if(dq.back() != a) dq.push_back(a);
}
while(!dq.empty()){
answer.push_back(dq.front());
dq.pop_front();
... | ALGO | 0.999992 | 5.254658 |
510ef69b-c468-4e6d-b28c-3e606c9b8955 | SmallzooDev/CodingInterviewCpp | src/problems/baekjoon/p9375/Main.cpp | // baekjoon - p9375
// https://www.acmicpc.net/problem/9375
#include <iostream>
#include <map>
#include <vector>
#include <string>
#include <algorithm>
// #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
for (int i =... | ALGO | 0.998448 | 4.420985 |
362a8ae8-d33f-49bc-badd-04fd22c65565 | yenju0425/LeetCode | Solutions/33. Search in Rotated Sorted Array/CPP/Search_in_Rotated_Sorted_Array.cpp | #include <iostream>
#include <vector>
using namespace std;
class Finder {
private:
vector<int> nums;
int nums_size;
int cur_ptr;
int target;
int fuel;
public:
Finder(vector<int> nums, int target) {
this->nums = nums;
this->nums_size = nums.size();
this->cur_ptr ... | ALGO | 0.999938 | 6.152812 |
85ccf4ca-11f3-4a52-a6b4-41595c4d0f48 | SakshamPandla/Evaluating-AI-Code-Generation | Llama/Problem Solving Test/PST C++(Llama).cpp | // Include the iostream library for input/output operations
#include <iostream>
// Use the standard namespace to avoid prefixing standard library elements
using namespace std; // Fixed typo: 'namspace' -> 'namespace'
int main() { // Fixed: 'main[]' -> 'main()'
int bikes, cars; // Fixed: 'bike' -> 'bikes' (assumin... | ALGO | 0.91348 | 6.377653 |
022dde72-4c00-407d-9d82-40a1e0e75e07 | renhaofan/Source-Archive | OpenCV/opencv_contrib-4.5.2/modules/saliency/src/saliency.cpp | #include "precomp.hpp"
namespace cv
{
namespace saliency
{
Saliency::~Saliency()
{
}
bool Saliency::computeSaliency( InputArray image, OutputArray saliencyMap )
{
if( image.empty() )
return false;
return computeSaliencyImpl( image, saliencyMap );
}
} /* namespace saliency */
} /* namespace cv */
| TOOL | 0.991545 | 6.548752 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.