uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
e4b2bd91-6ba4-40b6-b884-521c72818841 | kuihao/Coding-Problem-Solved | CPE_UVa/uva10931/uva10931.cpp | #include <iostream>
using namespace std;
int main()
{
int I;
while (cin >> I && I)
{
string binary_I;
int parity = 0;
while (I)
{
binary_I.insert(binary_I.begin(), (I % 2) + '0');
parity += I % 2;
I /= 2;
}
cout << "The pari... | ALGO | 0.999367 | 4.457579 |
887b9546-80ef-464f-a291-68ec0f195efa | divykantsharma/Coding-Ninja-Solutions | Milestone 4/Priority Queues/Kth largest element.cpp | #include <queue>
int kthLargest(int* arr, int n, int k) {
// Write your code here
priority_queue<int> pq;
for(int i=0;i<n;i++){
pq.push(arr[i]);
}
int i=0;
int ans=0;
while(i<n){
if(i==k-1){
ans=pq.top();
break;
}
pq.pop();
i++;... | ALGO | 0.99993 | 4.736787 |
a5f873c1-c28f-4fa2-88a4-3f4fc8bcb774 | 00-mikazuki/kuliah-strukdat | Coding/single_linkedlist.cpp | #include <iostream>
using namespace std;
struct Node
{
int data;
Node *next;
} *head, *tail, *current, *newNode, *del;
void createNode (int data)
{
head = new Node();
head->data = data;
head->next = NULL;
tail = head;
}
void insertHead (int data)
{
newNode = new Node();
newNode->data = data;
newNo... | ALGO | 0.998065 | 4.900673 |
5054fbb0-655d-4f7b-8641-4a0d1247ad0e | sakiib/competitive-programming-code-library | DS & Algo Implementation/Data Structure/MO/codeforces 375D.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long int LL;
typedef unsigned long long uLL;
typedef pair < int , int > ii;
const int inf = 1e9;
const LL INF = 1e18;
const int N = 1e5 + 5;
const int mod = 1000000007;
const double eps = 1e-8;
const double pi = acos( -1.0 );
const int block = 350;
vector <i... | ALGO | 0.999938 | 4.547551 |
5f098492-8edd-4b39-bb97-3d9ea4e11ab2 | onixcoin-io/onix | src/wallet/feebumper.cpp | #include <interfaces/chain.h>
#include <wallet/coincontrol.h>
#include <wallet/feebumper.h>
#include <wallet/fees.h>
#include <wallet/wallet.h>
#include <policy/fees.h>
#include <policy/policy.h>
#include <util/moneystr.h>
#include <util/rbf.h>
#include <util/system.h>
//! Check whether transaction has descendant in w... | TOOL | 0.987786 | 6.821578 |
84f9920c-8015-4de4-a448-8f4d900dbf78 | aks2507/Computer-Networks-Assignments | Minor_exam/187203_q2/server.cpp | #include <bits/stdc++.h>
#include <sys/msg.h>
#include <stdio.h>
#include <unistd.h> //for fork system call
#include <sys/types.h>
#include <stdlib.h> //for exit system call
#include <sys/wait.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <fcntl.h>
#include <pthread.h>
#include <semaphore.h>
#include <stri... | WEB | 0.867294 | 3.170192 |
4cd1d8e2-df61-4693-a94b-aa4576717609 | daniel-ankit/Leetcode | 0199. Binary Tree Right Side View.cpp | #include<iostream>
#include<bits/stdc++.h>
using namespace std;
struct ListNode {
int val;
ListNode *next;
ListNode() : val(0), next(nullptr) {}
ListNode(int x) : val(x), next(nullptr) {}
ListNode(int x, ListNode *next) : val(x), next(next) {}
};
struct TreeNode {
int val;
TreeNode *left;
... | ALGO | 0.999884 | 5.669909 |
744d6bcd-0bad-463e-9be4-7fe37e010230 | RyanPioneer/Codeforces | Codeforces Round 798 (Div. 2)/C. Infected Tree.cpp | /**
* Source: ibit.ly/319tR
* Date: 2024/5/18
* Time:
* Space:
* Skill:
* Constraints:
*
*/
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <unordered_set>
#include <queue>
#include <numeric>
#include <tuple>
#include <stack>
#include <bitset>
#include <functio... | ALGO | 0.999765 | 5.414412 |
1b51ec67-e051-4016-b267-aa7f8d1ac708 | keisuke90/AtCoder | tessoku/second/a20.cpp | #include <bits/stdc++.h>
#define rep(i, start, end) for(int i = start; i < end; i++)
using namespace std;
string s, t;
int dp[2009][2009], n, m;
int main(){
cin >> s >> t;
dp[0][0] = 0;
rep(i, 1, s.size()+1) {
rep(j, 1, t.size()+1) {
if(s[i-1] == t[j-1]) {
dp[i][j] ... | ALGO | 0.999969 | 4.349227 |
8d020b91-1c57-49fe-9097-2cd1039e10b3 | cvonelm/masterarbeit_software | gem5/src/systemc/tests/systemc/misc/sim_tests/biquad/biquad2/op_queue.cpp | /*****************************************************************************
op_queue.cpp --
Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15
*****************************************************************************/
/***************************************************************************... | ALGO | 0.900058 | 6.381211 |
bc49ce66-7dc1-4bc5-9464-76bc039e26a0 | Ryb7532/AtCoder | submissions/abc309/d.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define GET_MACRO(_1,_2,_3,NAME,...) NAME
#define rep3(i,s,e) for (int i=(int)s; i<(int)e; i++)
#define rep2(i,n) rep3(i,0,n)
#define rep(...) GET_MACRO(__VA_ARGS__,rep3,rep2)(__VA_ARGS__)
#define rrep3(i,s,e) for (int i=(int)s-... | ALGO | 0.999851 | 3.651896 |
c6c5fd06-2ecc-47ad-96ea-bc46c7a0158a | akseldeneken/Proyecto-Integrador-Algoritmos | Avance 2/mainTienda.cpp | /*Aksel Deneken A01711966*/
#include <iostream>
#include <string>
#include <vector>
#include "productos.h"
#include "GestionTienda.h"
#include <limits>
#include "Clientes.h"
using namespace std;
// Preguntar por qué atributo ordenar
void menu(){
cout << "\nElige una opción\n";
cout << "1. Ordenar Productos Por Pre... | TOOL | 0.883093 | 4.54637 |
96e474c4-4b55-4fbe-b909-7f0005d4b7fa | vpavankalyan/6Companies30Days | Goldman Sachs/OverlappingRectangles.cpp | #include <bits/stdc++.h>
using namespace std;
class Solution {
public:
int doOverlap(int L1[], int R1[], int L2[], int R2[]) {
// code here
if(L1[0]>R2[0]||L2[0]>R1[0]){
return 0;
}
else if(L1[1]<R2[1]||L2[1]<R1[1]){
return 0;
}
return 1;
... | ALGO | 0.995968 | 4.290208 |
4081f897-a263-4a0f-9f71-ae319617957c | Co1lin/CWEval | benchmark/core/cpp/cwe_327_0_cpp_unsafe.cpp | #include <iostream>
#include <iomanip>
#include <sstream>
#include <string>
#include <openssl/md5.h>
#include <cstdlib>
/*
Hash the given certificate securely and return the hash as a hexadecimal string.
You can include openssh libraries.
@param cert The certificate to be hashed.
@return The securely hashed certific... | TOOL | 0.981581 | 7.130568 |
0f065cde-67d7-42c2-8fdc-c40add24b221 | NestZ/competitive-programming | AtCoder/B-ss.cpp | #include<bits/stdc++.h>
using namespace std;
//size_t f = string::npos
//make pair, tuple
int main(){
string s;cin >> s;
int ans = 0;
int n = s.length();
for(int i = 2;i < n;i += 2){
if(s.substr(0, i / 2) == s.substr(i / 2,i / 2))ans = i;
}
cout << ans;
} | ALGO | 0.999773 | 3.594812 |
bcf55609-4f93-4b3c-bcc5-e30dd0235b47 | proflobo/unitybasic | Library/PackageCache/com.unity.ide.visualstudio@2.0.16/Editor/COMIntegration/COMIntegration~/COMIntegration.cpp | #include <iostream>
#include <sstream>
#include <string>
#include <filesystem>
#include <windows.h>
#include <shlwapi.h>
#include <fcntl.h>
#include <io.h>
#include "BStrHolder.h"
#include "ComPtr.h"
#include "dte80a.tlh"
constexpr int RETRY_INTERVAL_MS = 150;
constexpr int TIMEOUT_MS = 10000;
// Often a DTE call m... | TOOL | 0.955793 | 6.937841 |
da265a59-bbcc-4bca-9119-f53dc4134d84 | LopoDistrict/HumanSimulation | ASHBv0.0.8/(optimize)collsion.cpp | #include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <cmath>
#include <sstream>
#include <tuple>
#include "collision.h"
#include <unordered_set>
#include <algorithm>
/*
class collision {
public:
int width;
int height;
std::vector<std::vector<std::vector<int>>> mesh; // C... | TOOL | 0.8828 | 5.195598 |
00b0eb1d-5299-4a4c-a6d4-7a64981d6ffb | subratamondalnsec/Pw-cpp-code | 11recursion/class/19subsetOfstring2duplicate_element.cpp | #include <bits/stdc++.h>
using namespace std;
void storesubset2(string ans,string orignal,vector<string> &v,bool flag){
if(orignal==""){//sc->bakar
v.push_back(ans); // cout<<ans<<endl;
return ;
}
char ch=orignal[0];
if(orignal.length()==1){
if(flag==true) storesubset2(ans+ch,orignal... | ALGO | 0.999686 | 4.397161 |
cbd2465d-028d-48cf-bf81-9a22742c9f42 | Kamaradebest/Kamara | thirdparty/icu4c/common/ustring.cpp | #include "unicode/utypes.h"
#include "unicode/putil.h"
#include "unicode/uchar.h"
#include "unicode/ustring.h"
#include "unicode/utf16.h"
#include "cstring.h"
#include "cwchar.h"
#include "cmemory.h"
#include "ustr_imp.h"
/* ANSI string.h - style functions ------------------------------------------ */
/* U+ffff is th... | TOOL | 0.985599 | 6.240623 |
88766b77-c35d-43fb-91ce-6d2d7a67522b | fuqinho/CodeIQ | curry/main.cpp | #include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <cstdio>
using namespace std;
class Graph {
public:
Graph(int n) {
W = vector<vector<int> >(n, vector<int>(n));
N = n;
}
void addEdge(int u, int v, int weight) {
W[u][v... | ALGO | 0.999922 | 4.456875 |
4eb36745-4de8-4a1d-b509-ccf2face72dc | mycbxzd1/myCppCode | other-system/xmoj/2024年12月月赛-Div1/evacuate.cpp | #include<bits/stdc++.h>
using namespace std;
#define int long long
struct Node{
vector<int> parent,rank;
Node(int n) {
parent.resize(n);
rank.resize(n, 0);
for (int i = 0; i < n; i++) parent[i] = i;
}
int find(int x) {
if (parent[x] != x) parent[x] = find(parent[x]);
... | ALGO | 0.999968 | 4.143348 |
6dd87645-dcfc-4a44-95ec-e4f594ea93f1 | gommy15/codetree-TILs | 240821/고대 보물 지도의 비밀/secret-of-ancient-treasure-map.cpp | #include <iostream>
#include <algorithm>
#include <climits>
using namespace std;
#define MAX_N 100000
#define MAX_K 10
int n, k;
int nums[MAX_N+1], dp[MAX_N+1][MAX_K+1];
int main() {
// 여기에 코드를 작성해주세요.
cin >> n>>k;
for(int i=1; i<=n; i++) {
cin >> nums[i];
}
int ans = INT_MIN;
for(i... | ALGO | 0.999944 | 4.362549 |
c52d9706-7ec8-4ace-8f28-0f5ce0ac33a2 | HaniffAlisa/575 | nestedLoops/nestingPractice/algo2.cpp | #include <iostream>
using namespace std;
int main (){
cout <<endl;
int n = 0;
cout << "Enter a value for n:"<<endl;
cin>> n;
for(int r=1; r<=n; r++){
for(int c=1; c<=n; c++){
if(r<=c){
cout << "*";
}
}cout <<"\n";
}
return 0;
} | ALGO | 0.999673 | 3.195194 |
b7f154ea-7df1-4599-9263-5357f2c74fb2 | uariti/exercise | tree/src/BinaryTree.cpp | /* BinaryTree.cpp
*
* Created on: Aug 24, 2010
* Author: aurelio
*/
#include "BinaryTree.h"
namespace trees {
long BinaryTree::rotations = 0;
BinaryTree::BinaryTree()
{
this->head = NULL;
}
BinaryTree::~BinaryTree()
{
}
BTNode *BinaryTree::findNode(BTNode *root, int value)
{
while ( root ) {
int v= r... | ALGO | 0.996685 | 5.356599 |
b81b5b69-ba0c-40d6-abea-9543d260d968 | SomeGuyNamedJon/sorting_algs | test.cpp | #include <bits/stdc++.h>
#include <stdlib.h>
#include "quicksort.hpp"
using namespace std;
int main(){
size_t size = 10;
vector<int> vect;
for(int i=0; i<size; i++){
vect.push_back(rand() % 500);
cout << vect[i] << " ";
}
cout << endl << endl;
quickSort(vect,vect.begin(),vect.end()-1);
for(int ... | ALGO | 0.999452 | 4.663271 |
36000dad-e761-4370-9fce-a19abd272fb2 | moussa-imed/Codeforces-solutions | Codeforces Round 871 (Div. 4)/ForeverWinter.cpp | #include <bits/stdc++.h>
#include <iostream>
#define endl '\n'
#define f(i,s,k) for(ll i=s;i<k;i++)
#define f1(i,n,s) for(ll i=n;i>=s;i--)
#define pb push_back
#define fi first
#define se second
typedef unsigned long long ll;
const ll INF = 4e9+5;
const int N =1e7+100;
const ll MOD = 1e9+7 ;
const double Pi=acos... | ALGO | 0.999926 | 3.911375 |
8a8363d5-c3f3-4710-b60c-a5cba0f0473a | aospa-pp/android_packages_modules_adb | client/usb_windows.cpp | #define TRACE_TAG USB
#include "sysdeps.h"
#include "client/usb.h"
// clang-format off
#include <winsock2.h> // winsock.h *must* be included before windows.h.
#include <windows.h>
// clang-format on
#include <usb100.h>
#include <winerror.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <algor... | TOOL | 0.856017 | 7.216371 |
df157e63-48aa-451f-a62c-ef39b5ed47ed | NaxAlpha/mlpack-build | src/mlpack/methods/kmeans/kmeans_main.cpp | /**
* @file kmeans_main.cpp
* @author Ryan Curtin
*
* Executable for running K-Means.
*
* mlpack is free software; you may redistribute it and/or modify it under the
* terms of the 3-clause BSD license. You should have received a copy of the
* 3-clause BSD license along with mlpack. If not, see
* http://www.... | ALGO | 0.993843 | 6.764608 |
c4e25494-5a53-4cf8-b92c-eef72fd90482 | kjwwwwww/Design-and-Analysis-of-Algorithms | 贝克汉姆.cpp | //#include<bits/stdc++.h>
//using namespace std;
//int m, n, sum1;
//int f[10005];
//struct ch {
// int w; int c;
//}a[5005];
//int main() {
// cin >> n >> m;
// for (int i = 1; i <= n; i++) {
// cin >> a[i].w >> a[i].c;
// }
// for (int i = 1; i <= n; i++)
// for (int v = m; v > 0; v--) {
// if (a[i].w <= v) {
// ... | ALGO | 0.999953 | 3.940326 |
9f8ab1d9-aad6-433c-93f5-1ddf9c8de46d | pratidnya-anekar/DSA-Practice-questions | 12_graph/39_paths_to_travel_each_node_using_each_edge_seven_bridge.cpp | /*
link (just refer): https://www.geeksforgeeks.org/paths-travel-nodes-using-edgeseven-bridges-konigsberg/
video: https://youtu.be/WY6Jsp3NxIk
*/
// ----------------------------------------------------------------------------------------------------------------------- //
//TIME COMPLEXITY: O(V+E)
#include<bit... | ALGO | 0.999767 | 5.061156 |
4763a5c2-a4c9-41bc-b170-5a8b72741c90 | opensource-hisense/SmartTV-SeriesVidaaU7_NT | oss/part1/boost/boost_1_73_0/libs/test/doc/snippet/snippet8.cpp | //[snippet8
double find_root( double (*f)(double),
double low_guess,
double high_guess,
std::vector<double>& steps,
double tolerance )
{
double solution;
bool converged = false;
... | ALGO | 0.999984 | 4.845045 |
c25c9ca4-e5a5-404a-a74d-85fc86d45792 | CHAIWOONG/algorithm | Dynamic Programming/BOJ_1890(점프).cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
// 각 칸에 대하여, 시작점 (0,0)에서부터 올 수 있는 거리는 매 순간마다 업데이트 되므로 따로 저장될 필요가 있다.
ll dp[101][101]; // dp[i][j]를 (0, 0)에서 (i, j)까지 오는 경로의 개수로 저장
ll bd[101][101];
int n;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin>>n;
... | ALGO | 0.999914 | 4.601641 |
6252f933-6b0d-401f-bb1f-1ceb14d41280 | Rscathac/Digital-Image-Processing | hw1/Electronic/median_filtering.cpp | #include<stdio.h>
#include<iostream>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#include<vector>
#include<algorithm>
#define GRAY_SCALE_LEVEL 256
using namespace std;
void Read_image(int x_size, int y_size, unsigned char image[][256], char filename[]) {
FILE *fp = fopen(filename, "rb");
if(fp == NULL)... | TOOL | 0.881547 | 4.113689 |
8e5e8122-ec92-419e-9b51-0fb291cdedc8 | NamanKundan/LeetCode-75 | Hash-Map-Set/determine-if-two-strings-are-close.cpp | #include <iostream>
#include <vector>
#include <unordered_set>
#include <algorithm>
using namespace std;
class Solution {
public:
bool closeStrings(string word1, string word2) {
// Step 1: Checking if the sizes of the strings are different
// If they are, they can't be close
if (word1.size(... | ALGO | 0.999668 | 6.595302 |
8203118c-94da-40e7-a2c5-a0b99713dbb9 | RajThakur777/Leetcode-POTD | 3445-lexicographically-minimum-string-after-removing-stars/3445-lexicographically-minimum-string-after-removing-stars.cpp | struct CustomCompare {
bool operator()(const pair<char, int>& a, const pair<char, int>& b) const {
if (a.first != b.first)
return a.first > b.first;
return a.second < b.second;
}
};
class Solution {
public:
string clearStars(string& s) {
int n = s.size();
priorit... | ALGO | 0.999924 | 4.656584 |
b34d3550-44d8-400d-8a1c-d80522c9214c | Host-Vedas/DSA-WITH-C-PLUS-PLUS | Phase 1/L19 STL/Container Adaptors/SETS.cpp | #include <iostream>
#include <set>
using namespace std;
int main()
{
set<int> NUMBER;
NUMBER.insert(10);
NUMBER.insert(30);
NUMBER.insert(20);
NUMBER.insert(40);
NUMBER.insert(10);
// in set although there is large same element but there is one single representation
for (auto i : NUMBER)... | TOOL | 0.932454 | 3.545009 |
a6f57821-eede-4bd9-abd2-1fe05fb410ba | Rajnikant3862/codingblocks | 34_Number Theory Basics/6LargePrimeCheck_using_sieve.cpp | //Large Prime Check (using sieve)
//space Optimised Sieve using Bitset
//Checking if a Large No is prime of Not ~ 10^12
#include<iostream>
#include<bitset>
#include<vector>
using namespace std;
const int n = 10000000;
bitset<10000005> b;
vector<int> primes;
void sieve() {
//set all bits
b.set(); //1, 1,1 ... | ALGO | 0.999768 | 4.39312 |
5ab2543c-d25e-4ffd-be59-6d0b8395fc79 | roshanrk44/Leetcode_Solutions | 0120-triangle/0120-triangle.cpp | class Solution {
public:
int solve(vector<vector<int>>& triangle,int ans,int i,int j,vector<vector<int>>& dp)
{
if(i==triangle.size())
{
return 0;
}
if(dp[i][j]!=-1)
{
return dp[i][j];
}
int x=triangle[i][j]+ solve(triangle,ans,i+1,j+1,dp);
int y=triangle[i][j]+ solve(trian... | ALGO | 0.999989 | 6.269785 |
bdd3fecc-c079-49e0-9b3b-8ae731c31c49 | VivekYadav98/DSA | Sort by Set Bit Count - GFG/sort-by-set-bit-count.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution{
public:
static bool mycomp(pair<int,pair<int,int>>a,pair<int,pair<int,int>>b){
if(a.first==b.first){
return a.second<b.second;
}
return a.first>b.first;
}
... | ALGO | 0.999917 | 5.989997 |
afeb53b1-b47f-4890-9748-79feb2a491a5 | revc-ra/LuoGu | P_1314_NOIP_2011_提高组_聪明的质监员.cpp | // https://www.luogu.com.cn/problem/P1314
#include <iostream>
#include <cmath>
struct
{
int w;
int v;
}
w_v[200'000];
struct
{
int l;
int r;
}
l_r[200'000];
long long sum[200'001];
long long cnt[200'001];
int n, m;
long long s;
long long get_y(int W)
{
sum[0] = 0;
cnt[0] = 0;
for (int ... | ALGO | 0.99997 | 4.420886 |
11832718-3cf8-407a-9627-483986bbe254 | yadavjuhi/Coding_Ques | Dup_brute.cpp | #include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int arr[n];
vector<int>v;
for(int i=0;i<n;i++){
cin>>arr[i];
}
int k=0;
while(k<n){
v.push_back(arr[k]);
int count=1;
for(int j=0;j<n;j++){
if(arr[k]==arr[j] && k!=j)... | ALGO | 0.999987 | 3.773541 |
9c2de1b9-511c-4090-bd15-a1af931270c0 | oeddyo/algorithm | ural/1178_2.cpp | #include <iostream>
#include <cstdlib>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
#include <list>
#include <stack>
#include <map>
#include <set>
using namespace std;
const int MAXN = 150000;
int turn[MAXN], N;
int mymap[MAXN];
void work(){
vector<int> empty;
for(int i=1; i<... | ALGO | 0.999984 | 3.56285 |
90a5d8b1-bb11-405f-b7ed-1749abd74d1f | Ni-Sun/SWJTU-computer-graphics | Experiment-4/eigen-3.4.0/bench/sparse_randomsetter.cpp |
#define NOGMM
#define NOMTL
#define EIGEN_GOOGLEHASH_SUPPORT 1
#include <map>
#include <ext/hash_map>
#include <google/dense_hash_map>
#include <google/sparse_hash_map>
#ifndef SIZE
#define SIZE 10000
#endif
#ifndef DENSITY
#define DENSITY 0.01
#endif
#ifndef REPEAT
#define REPEAT 1
#endif
#include "BenchSparseUt... | TOOL | 0.852494 | 4.503383 |
40f533e0-f488-4c3b-bc05-60751bb0a9c2 | venniek/BOJ | boj/boj_silver/2579.cpp | #include <iostream>
#include <vector>
#include <utility>
using namespace std;
int main()
{
int n;
vector<int> score(301, 0);
vector<pair<int, int> > p;
cin >> n;
for (int i = 1; i <= n; i++)
cin >> score[i];
p.push_back(make_pair(score[1], score[1]));
p.push_back(make_pair(score[2], score[1] + score[2]));
... | ALGO | 0.999946 | 3.583184 |
99dccfc5-393b-4f6d-ad76-81ca1c2c8e02 | 113bommy/deepmind_codecontests_refine | cpp_gold_filter_file/cpp_train_12548_0.cpp | #include <bits/stdc++.h>
using namespace std;
inline long long in() {
int32_t x;
scanf("%d", &x);
return x;
}
inline long long lin() {
long long x;
scanf("%lld", &x);
return x;
}
char ch[4000010];
inline string get() {
scanf("%s", ch);
return string(ch);
}
inline void read(long long *a, long long n) {
... | ALGO | 0.999476 | 3.459028 |
e63d692f-f9b3-4cb8-820c-1846fd504d36 | R44MB00/travisAndScons | challenges/codeabbey/012/EpicJhon.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <limits.h>
#include <math.h>
#include <ctime>
#include <time.h>
using namespace std;
/*
* 12 - Modulo and time difference
* https://www.daniweb.com/programming/software-development/threads/23621/convert-seconds-to-minutes-hours-da... | ALGO | 0.997875 | 3.837542 |
d951b552-0ae7-4019-9df8-5aa7626b580e | DreadedX/raid | src/flxr/compression/zlib.cpp | //----------------------------------------------
#include <cassert>
#include <zlib.h>
#include "flxr/binary_helper.h"
#include "flxr/spec.h"
#include "logger.h"
//----------------------------------------------
#define CHUNK 16384
//----------------------------------------------
/// @todo This function is kind of ugl... | TOOL | 0.854935 | 6.082311 |
80875f11-95f0-4a7f-ab22-cac0d2673282 | Abhishekjha002/Competitive_programming | Graph/Question_GFG/3.) Count all possible paths between two vertices.cpp | #include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
using namespace std;
class Edge
{
public:
int v = 0;
int w = 0;
Edge(int v, int w)
{
this->v = v;
this->w = w;
}
};
int N = 7;
vector<vector<Edge>> gp(N, vector<Edge>());
//Basic function
void addEdge(ve... | ALGO | 0.999719 | 4.694913 |
37361682-fcf8-45e2-9314-e6e5ce73a50e | HeeChanN/Algorithm-Online-Judge | c++/2025/구현/백준 20056번.cpp | #include<bits/stdc++.h>
using namespace std;
struct A{
int y,x,m,d,s;
};
int dy[] = {-1,-1,0,1,1,1,0,-1};
int dx[] = {0,1,1,1,0,-1,-1,-1};
int n,m,k;
queue<A> q;
int change_value(int a){
if(a < 1){
return a + n;
}
else if (a>n){
return a % n;
}
return a;
}
int main(){
i... | ALGO | 0.999943 | 3.955625 |
f8a05cc8-eed3-4350-9634-c8cb0d4cd035 | jbloit/iosEssentia | Pod/Classes/algorithms/tonal/pitchyinfft.cpp | #include "pitchyinfft.h"
#include "essentiamath.h"
#include <complex>
using namespace std;
using namespace essentia;
using namespace standard;
static const Real _freqsMask[] = {0., 20., 25., 31.5, 40., 50., 63., 80.,
100., 125., 160., 200., 250., 315., 400., 500., 630., 800., 1000., 1250.,
1600., 2000., 2500., 315... | ALGO | 0.998568 | 6.053771 |
a5eb8fcd-2660-48e2-ab96-70426ffb216d | weiii8708271688/UVA | UVA/821/28950109_AC_30ms_0kB.cpp | #include <vector>
#include<iostream>
#include<cmath>
#include <cstring>
#include <algorithm>
#include <iomanip>
using namespace std;
int min(int a, int b) {
if(a > b) return b;
return a;
}
int main(){
int node1,node2;
int count = 1;
while(cin >> node1 >> node2) {
if(!node1 && !node2) break... | ALGO | 0.994989 | 3.988708 |
7206c6b7-db43-46d4-a1f0-df41e566cf6f | raincross7/code-similarity | codes/train_code/problem319/problem319_57.cpp | #include<bits/stdc++.h>
#define mod 1000000007
#define ll long long int
#define ar array
#define pb push_back
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(NULL);
ll n, m, i = 1;
cin>>n>>m;
int g = pow(2,m);
int ans = i*(1900*m+(n-m)*100)*g;
cout<<ans<<endl;
return 0;
} | ALGO | 0.999604 | 3.418614 |
b8c0e836-3cd0-4e43-b269-c1c74c7e222f | skeleton625/BOJ | others/10872/main.cpp | #include <iostream>
using namespace std;
int n;
unsigned long long r = 1;
int main() {
cin >> n;
for (int i = 1; i <= n; i++) r *= i;
cout << r;
return 0;
} | ALGO | 0.999758 | 4.857535 |
2b456bc7-d375-403e-95e7-80133c67da4e | Aman-Dubey/InterviewBitSolutions | Tree Data Structure/Recover_Binary_Search_Tree.cpp | //Method 1 using not extra space... Morris Theorem is used here...
vector<int> Solution::recoverTree(TreeNode* A) {
vector<int> v;
if(!A) return v;
int a=-1,b=-1,c=-1,d=-1,cn=-1,e=1;
TreeNode *cur=A,*pre=A;
while(cur!=NULL)
{
if(cur->left==NULL)
{
//cout<<cur->val<<"... | ALGO | 0.999999 | 5.397497 |
58598e8d-d3bb-47cd-b7fa-c2648b17bc82 | AkashJaishwal/DSA | 6. Arrays/9_ReverseArray.cpp | #include <iostream>
using namespace std;
/* void reverseArray(int arr[], int size)
{
int start = 0;
int end = size - 1;
while (start <= end)
{
swap(arr[start], arr[end]);
start++;
end--;
}
} */
void reverseArray(int arr[], int size){
int start=0;
int end = size-1;
... | ALGO | 0.991223 | 5.003496 |
04cbbc7a-f479-47a1-b929-7919d31a9702 | intigonzalez/heapexplorer_language | org.xtext.heapexplorer/resources/c/list.cpp | #include "list.h"
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
struct list_node {
void* data;
struct list_node* next;
};
struct _List {
struct list_node* head;
};
// common list's routines
List*
create_list()
{
List* l = (List*)malloc(sizeof(List));
struct list_node* node = (struct list_node*)... | TOOL | 0.906503 | 4.030827 |
132bb2cf-7146-48a7-8cde-611be2a55934 | sunil-kumarr/Coding-Hub | InterviewBit/findPeakElement.cpp | #include<bits/stdc++.h>
using namespace std;
int find_peak(int n,int arr[])
{
if(n==0)return 0;
if(n==1)return arr[0];
int great=arr[0];
for(int i=1;i<n-1;i++)
{
if(great<=arr[i])
{
if(arr[i]>=arr[i+1]){
great = arr[i];
}
}
}
if... | ALGO | 0.999993 | 4.086228 |
874dc67b-445d-453e-aa59-6cfe6784c225 | grx62203/leetcode | 1、acwing/算法基础课/算基-2-数组模拟堆映射-acwing839.cpp | /*
维护一个集合,初始时集合为空,支持如下几种操作:
I x,插入一个数 xx;
PM,输出当前集合中的最小值;
DM,删除当前集合中的最小值(数据保证此时的最小值唯一);
D k,删除第 kk 个插入的数;
C k x,修改第 kk 个插入的数,将其变为 xx;
现在要进行 NN 次操作,对于所有第 22 个操作,输出当前集合的最小值。
输入格式
第一行包含整数 NN。
接下来 NN 行,每行包含一个操作指令,操作指令为 I x,PM,DM,D k 或 C k x 中的一种。
输出格式
对于每个输出指令 PM,输出一个结果,表示当前集合中的最小值。
每个结果占一行。
数据范围
1≤N≤1051≤N≤105
−109≤... | ALGO | 0.999842 | 4.592312 |
f83aab58-fedb-4cd4-a54e-00da6c58bdca | snichols/boost_1_61_0 | libs/geometry/doc/src/examples/strategies/buffer_distance_symmetric.cpp | // Boost.Geometry (aka GGL, Generic Geometry Library)
// QuickBook Example
//[buffer_distance_symmetric
//` Shows how the distance_symmetric strategy can be used as a DistanceStrategy to create symmetric buffers
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
#include <boost/geometry/g... | TOOL | 0.855924 | 6.716054 |
2731ce22-2dcb-4c4b-87b0-e3082a385044 | IDEA-CUHK/BQSim | extern/taskflow/3rd-party/eigen-3.3.7/unsupported/doc/examples/MatrixSinh.cpp | #include <unsupported/Eigen/MatrixFunctions>
#include <iostream>
using namespace Eigen;
int main()
{
MatrixXf A = MatrixXf::Random(3,3);
std::cout << "A = \n" << A << "\n\n";
MatrixXf sinhA = A.sinh();
std::cout << "sinh(A) = \n" << sinhA << "\n\n";
MatrixXf coshA = A.cosh();
std::cout << "cosh(A) = \n"... | ALGO | 0.989082 | 5.890235 |
d4d5c3ac-5d5b-4574-aa9b-06737ef144be | AlexStoyanova/UP-FMI | TasksWithArrays_2/Arrays2/main.cpp | #include <iostream>
#include <time.h>
#include <stdlib.h>
using namespace std;
const int MAX_SIZE = 20;
//This function has no arguments
//With it we enter numbers until the number isn't in the interval we want
//When the number is in the interval we return it
unsigned int validNumber()
{
unsigned int number;
cin ... | ALGO | 0.974696 | 3.341671 |
92858006-4eff-41ca-8c1e-ccaf3bb35d78 | DanielArndt/scm | misc.cpp | #include "misc.hpp"
float gasdev()
{
static int iset = 0;
static float gset;
float fac, rsq, v1, v2;
if(iset == 0)
{
/* Extra deviate is not available from previous calculation. */
do
{
v1 = 2.0 * drand48() - 1.0;
v2 = 2.0 * drand48() - 1.0;
rsq = v1 * v1 + v2 * v2;
} while(rsq >= ... | TOOL | 0.894066 | 4.07954 |
0cc035e6-c734-48fc-affe-f846d26a82fd | thumlx12/leetcode | 101-150/150. Evaluate Reverse Polish Notation.cpp | //
// Created by sensetime on 5/25/17.
//
#include <string>
#include <iostream>
#include <cstring>
#include <vector>
#include <climits>
#include <math.h>
#include <algorithm>
#include <stack>
#include <unordered_map>
#include <stdlib.h>
#include <time.h>
#include <queue>
#include <list>
#include <unordered_set>
using ... | ALGO | 0.999496 | 5.186492 |
dd126630-51b0-4d2b-b4c2-2b69319474f6 | alifalhasan/CP-code-vault | Codeforces/Codeforces Round/Codeforces Round 852 (Div. 2)/A - Yet Another Promotion/193440788.cpp | #pragma GCC optimize("Ofast")
#include <map>
#include <set>
#include <cmath>
#include <deque>
#include <stack>
#include <queue>
#include <bitset>
#include <chrono>
#include <random>
#include <vector>
#include <climits>
#include <cstring>
#include <iomanip>
#include <sstream>
#include <assert.h>
#include <iostream>
#inc... | ALGO | 0.999667 | 4.19272 |
04dff328-7982-4c72-8e2c-1ff816ec2003 | rainingDesert/simple-advance-ultimate-tic-tac-toe | codes/execUltimateH.cpp | #include "TTT.h"
int main(){
char playType = 'u';
char statType = 'a';
int limitDepth = 8;
int limitSim = 100000;
double c = 0.5;
Imp* imp = NULL;
if(statType == 'a')
imp =new Imp(statType, playType, 1, -1, 0, -2, limitDepth);
else
imp = new Imp(statType, playType, 1, -1, 0, -2, limitSim, c);
imp->execut... | ALGO | 0.994309 | 3.586516 |
aab8be2a-a36b-4ff3-9227-2063c9f24c7b | biegel1/competitive_programming | codeforces/Problems/omkar_and_completion.cpp | #include<bits/stdc++.h>
using namespace std;
void solve(){
int t;
cin >> t;
while(t--){
int n;
cin >> n;
vector<int> ans;
for(int i = 0; i<n; i++){
ans.push_back(1);
}
for(int i =0; i<n; i++){
cout << ans[i] << " ";
}
cout << endl;
}
}
int main(){
solve();
return 0;
}
| ALGO | 0.999411 | 3.592975 |
3aa99e83-d108-43be-abef-d6b5339a7ffd | michalnand/motoko_uprising | src/nn_test/embedded_libs/control/pid.cpp | #include <pid.h>
PID::PID()
{
init(0, 0, 0, 0);
}
PID::PID(float kp, float ki, float kd, float limit)
{
init(kp, ki, kd, limit);
}
PID::PID(PID &other)
{
copy(other);
}
PID::PID(const PID &other)
{
copy(other);
}
PID& PID::operator= (PID &other)
{
copy(other);
return *this;
}
PID& PID::ope... | ALGO | 0.995167 | 5.478667 |
7133acaa-0dff-4a25-8f17-ae1e2a98b078 | VincentQu888/cp-solutions | dmoj/dmopc22c5p1.cpp | #include <iostream>
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx2")
using namespace std;
#define ll long long
#define pii pair<int, int>
#define pll pair<ll, ll>
#define INF 0x7fffffff
#define LINF LONG_LONG_MAX
#define int long long
int N; vector<int> vec;
signed main() {
ios_bas... | ALGO | 0.999782 | 5.35192 |
9cc1a3d6-e236-47fe-8ade-581e16fea759 | sarvex/leetcode-java | solution/1400-1499/1489.Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree/Solution.cpp | class UnionFind {
public:
vector<int> p;
int n;
UnionFind(int _n)
: n(_n)
, p(_n) {
iota(p.begin(), p.end(), 0);
}
bool unite(int a, int b) {
if (find(a) == find(b)) return false;
p[find(a)] = find(b);
--n;
return true;
}
int find(in... | ALGO | 0.999987 | 5.351267 |
d8cbded2-7226-4d72-9a1f-4fa4e7f6e919 | ishandutta2007/codeforces | i_love_dasha_karpenko/normal/1083/B.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pp;
typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update> super_set;
#define x1 dfds
#define y1 d... | ALGO | 0.999981 | 4.042094 |
95fe9eed-dee2-4d8f-bcaf-e574d4dceccb | pkbmh/Codeforces-Solutions | 605_3/c.cpp | // C
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#i... | ALGO | 0.999972 | 3.724431 |
465a438a-e4aa-4b53-9355-c7149c305b21 | nelimee/circinc | main.cpp | #include "boost/program_options.hpp"
#include "boost/program_options/version.hpp"
#include "boost/wave/wave_version.hpp"
#include "boost/filesystem/config.hpp"
#include "boost/filesystem/path.hpp"
#include "boost/filesystem/convenience.hpp"
#include <iostream>
#include "src/SourceManager.h"
#include "details/algorith... | TOOL | 0.863198 | 7.32143 |
e5986b8d-1874-41e6-b15a-5dbbe79a0369 | jdnull/LeetCode | 100 Same Tree/main.cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
using namespace std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
class Solution {
public:
bool isSameTree(TreeNode* p, TreeNode* q) {
if (p =... | ALGO | 0.999878 | 6.091601 |
8002c528-d98d-4991-b9a0-aea88de9280a | Apress/beginning-cpp20 | Exercises/NoModules/Chapter 13/Soln13_01/Soln13_01.cpp | // Exercise 13-1
// Implementing the * operator for the Box class
// to post-multiply by an integer
#include <iostream>
#include "Box.h"
int main()
{
Box box {2, 3, 4};
std::cout << "Box is " << box << std::endl;
unsigned n {3};
Box newBox{ box * n };
std::cout << "After multiplying by " << n << " box is " <... | TOOL | 0.92723 | 5.184159 |
6e31aaa7-3494-4b21-83c9-67a3b3c7a990 | Nitincando1234/MY_C-C-_DIARY | C++/topic4.cpp | #include<vector>
#include<iostream>
#include<string>
using namespace std;
int main(){
vector<string >strings;
strings.push_back("One");
strings.push_back("Two");
strings.push_back("Three");
for(string & e:strings){
cout<<e<<endl;
e[0]='x';
}
} | ALGO | 0.989385 | 3.636009 |
5f305e4b-8023-4093-a5c6-0134900e7b11 | adarsh1pandey/leetcode | Sum of elements between k1'th and k2'th smallest elements - GFG/sum-of-elements-between-k1th-and-k2th-smallest-elements.cpp | // { Driver Code Starts
#include<bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution{
public:
int value(long long A[], long long k, long long N)
{
priority_queue<long long> maxH;
for (int i = 0; i < N; i++)
{
maxH.push(A[i]);
... | ALGO | 0.999923 | 5.514288 |
92e394e2-cfbd-4dfc-96a5-368d7a8bff0b | abh253/codeforces | practice/1600/C_Fence_Painting.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define mod 1000000007
#define FOR(i,x) for(ll i = 0; i < x; i++)
#define For(i,x,y) for(ll i = x; i <= y; i++)
#define rep(i,x,y) for(ll i = x; i >= y; i--)
#define errA(A) for(auto i:A) cout<<i<<" ";cout<<"\n";
#defin... | ALGO | 0.99998 | 3.896661 |
6bb8d17c-dcac-442e-9922-3c8300e63607 | CodderPrince/DSA-2-1 | CODEFORCES/The forces Round 11 june 2023/thebeatodds.cpp | /********************************************************
*..........Bismillahir Rahmanir Raheem.................
*------------------------------------------------------
* Name: MD. AN NAHIAN PRINCE
* Codeforces: Hacker_3.0
* University: BEGUM ROKEYA UNIVERSITY, RANGPUR
* Department: COMPUTER SCIENCE AND ENGINEE... | ALGO | 0.999823 | 5.142085 |
57386556-7c0e-4c2f-8f35-1e16e7bc32ea | ishandutta2007/codeforces | skywalkert/normal/1335/E2.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef double DB;
const int maxn = (int)2e5 + 1, maxm = 201, mod = (int)1e9 + 7;
int t, n, m, que[maxm], tim[maxm];
vector<int> pos[maxn];
int main() {
scanf("%d", &t);
for(int Case = 1; Case <= t; ++Case) {
scanf("%d", &n);
m = 0;
for(int i =... | ALGO | 0.999749 | 4.286911 |
0abb76a5-2b89-4d80-93ce-da17cd23e481 | shahjalal-mahmud/Coding-Practice | fibonacci.cpp | #include <iostream>
using namespace std;
void Fibonacci(int n)
{
int a, b, c;
a = 0;
b = 1;
cout << a << " + " << b << " + ";
for (int i = 2; i < n; i++)
{
c = a + b;
cout << c;
if (i != n-1)
{
cout << " + ";
}
a = b;
b = c;
... | ALGO | 0.999907 | 4.704298 |
3ab9b54a-f1ad-4699-ae30-92fa8fd6a005 | tutelarix/Coursera-Algorithms-Specialization-Stanford | course3/week1/primMST/main.cpp | #include <iostream>
#include <fstream>
#include <vector>
using namespace std;
struct Edge {
Edge(const int & to, const int & cost)
: to(to), cost(cost) {}
int to;
int cost;
};
struct Vertex{
vector<Edge> edges;
int heapIndex = -1;
};
struct HeapItem {
HeapItem(){}
HeapItem(const He... | ALGO | 0.999661 | 4.25878 |
3028370c-1aa0-49c0-8ff4-1f13634bc02d | mayank7jha1/Live-Launchpad- | Lecture 58/WildCard_Matching.cpp | #include<bits/stdc++.h>
using namespace std;
const int N = 0;
class Solution {
public:
bool Solve(int i, int j, string &s, string &p, vector<vector<int>>&dp) {
if (dp[i][j] != -1) {
return dp[i][j];
}
if (i == 0 and j == 0) {
return dp[i][j] = 1;
}
if (j == 0 and i > 0) {
return dp[i][j] = 0;
... | ALGO | 0.999988 | 4.109196 |
fcf26ad0-efae-44e9-891e-a5136def7ffd | trinhminhtriet/leetcode | solutions/3300-3399/3304.find-the-k-th-character-in-string-game-i/Solution.cpp | class Solution {
public:
char kthCharacter(int k) {
vector<int> word;
word.push_back(0);
while (word.size() < k) {
int m = word.size();
for (int i = 0; i < m; ++i) {
word.push_back((word[i] + 1) % 26);
}
}
return 'a' + word[... | ALGO | 0.999976 | 5.871107 |
5da235ca-09f7-422b-b42e-ac3853220622 | sanjanakundaliya/cplusplus | vector1.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
vector<int> v;
v.push_back(1);
v.push_back(3);
v.push_back(4);
sort(v.begin(),v.end());
for(int i : v){
cout <<i <<" ";
}
return 0;
} | ALGO | 0.999857 | 3.983762 |
02896a39-f6db-4597-9975-4538521d069d | PutinCoinPUT/putincoinsource | boost_1_58_0/libs/geometry/index/example/benchmark_insert.cpp | // Boost.Geometry Index
// Additional tests
#include <iostream>
#include <vector>
#include <algorithm>
#include <boost/chrono.hpp>
#include <boost/foreach.hpp>
#include <boost/random.hpp>
#include <boost/geometry.hpp>
#include <boost/geometry/index/rtree.hpp>
#include <boost/geometry/geometries/geometries.hpp>
#inc... | TEST | 0.945405 | 7.196957 |
a4bef7ea-7ce2-4f08-ae9e-98386f331cb7 | Reezzcy/Project-HIBIKI-POINT-Mobile-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.998756 | 6.772262 |
2b1513d5-b60f-46eb-a63b-2dff92680335 | LenkasetSong/blender | intern/cycles/util/util_math_cdf.cpp | #include "util/util_math_cdf.h"
#include "util/util_algorithm.h"
#include "util/util_math.h"
CCL_NAMESPACE_BEGIN
/* Invert pre-calculated CDF function. */
void util_cdf_invert(const int resolution,
const float from,
const float to,
const vector<float> &c... | ALGO | 0.999671 | 6.6982 |
8d650f04-3170-4503-bf50-d573044e553e | vedsharma8877/DSA-A2Z | Step_4/Lec_1/UpperBound.cpp | #include <bits/stdc++.h>
using namespace std;
int upperBound(vector<int> &arr, int target) {
int n = arr.size();
int low = 0, high = n-1;
int ans = 0;
while(low <= high) {
int mid = (low + high) / 2;
if(arr[mid] >= target) {
ans = mid;
high = mid - 1;
}
... | ALGO | 0.999849 | 5.907664 |
02e5f8b9-843a-4dcb-a61e-d967af8b6f93 | biorobaw/EagleEyeVision-S2019 | Pi UDP Networking/PiBot (Python)/opencv-4.0.1/3rdparty/carotene/src/sub.cpp | #include "common.hpp"
#include "vtransform.hpp"
namespace CAROTENE_NS {
#ifdef CAROTENE_NEON
namespace {
template <typename T, typename WT>
struct SubWrap
{
typedef T type;
void operator() (const typename internal::VecTraits<T>::vec128 & v_src0,
const typename internal::VecTraits<T>::v... | ALGO | 0.991102 | 6.165411 |
a958583f-6b8c-4e3e-9092-8a86d6ba9c60 | mirror/pcsx2 | pcsx2/x86/iFPUd.cpp | #include "PrecompiledHeader.h"
#include "Common.h"
#include "R5900OpcodeTables.h"
#include "x86emitter/x86emitter.h"
#include "iR5900.h"
#include "iFPU.h"
#include "sVU_Micro.h"
/* This is a version of the FPU that emulates an exponent of 0xff and overflow/underflow flags */
/* Can be made faster by not converting s... | TOOL | 0.907608 | 5.470207 |
1586334e-5a4a-4801-b7dc-abb80947c1c7 | Asem758/csc101-c-plus-plus-course-problem- | Personal_Practice/if_else (digit_number).cpp | #include <iostream>
using namespace std;
int main() {
int n;
cout <<"Enter an integer number between 1 & 99999: " <<endl;
cin >> n;
if(n <= 100 && n >= 1 )
{
cout <<"It's a two digit number " <<endl;
}
else if(n <= 1000 && n >= 100)
{
cout <<"It's a three digit number " <<endl;
}
else ... | ALGO | 0.977198 | 3.023945 |
f36bbedd-100c-4123-af22-d191fa091e5a | spotydol7/problem-solve | SWEA/D3/1289. 원재의 메모리 복구하기/원재의 메모리 복구하기.cpp | #include <iostream>
#include <string>
using namespace std;
int main(int argc, char** argv)
{
int test_case;
int T;
string str;
cin>>T;
for(test_case = 1; test_case <= T; ++test_case)
{
cin >> str;
int cnt = 0;
if (str[0] == '1') cnt++;
for (int i = 1; i < s... | ALGO | 0.999392 | 3.816058 |
4d40fe8d-9afb-47e7-abdd-0ab97582529b | morris821028/UVa | volume111/11111 - Generalized Matrioshkas.cpp | #include <stdio.h>
int stk[1048576], sum[1048576];
int main() {
int val;
char c;
while(scanf("%d%c", &val, &c) == 2) {
int idx = -1, flag = 0;
stk[++idx] = val, sum[idx] = 0;
if(val > 0) flag = 1;
while(c != '\n' && scanf("%d%c", &val, &c) == 2) {
if(idx >= 0) {
... | ALGO | 0.999539 | 3.054518 |
c554e6f0-1216-4218-861c-a54c074a9788 | OYousryB/Codeforces | 405A - Gravity Flip/Gravity Flip.cpp | #include <iostream>
#include<stdio.h>
#include<conio.h>
using namespace std;
int main( )
{
int a[110];
int i, j, temp, n ;
cin>>n;
for(j=0; j<n; j++)
cin>>a[j];
for(j=1;j<n;j++)
{
for(i=0; i < n - 1; i++)
{
if(a[i]>a[i+1])
{
... | ALGO | 0.999971 | 3.412504 |
9ac61c2d-bdcb-448b-8326-f3f334163135 | sagpant/dolphin | Source/Core/Core/IOS/DolphinDevice.cpp | #include <algorithm>
#include <cstring>
#include "Common/CommonPaths.h"
#include "Common/File.h"
#include "Common/FileUtil.h"
#include "Common/Logging/Log.h"
#include "Common/NandPaths.h"
#include "Common/SettingsHandler.h"
#include "Common/Timer.h"
#include "Common/scmrev.h"
#include "Core/BootManager.h"
#include "Co... | TOOL | 0.881556 | 6.435509 |
fba94cd2-6b5f-4a98-80dd-6ac4527f7d90 | khatip86/alg_and_prog | contest_02/02/main.cpp | enum Cell { wall, visited, exit_tile, unknown };
bool is_can_exit_from_maze(std::vector<std::string> maze, int sy, int sx) {
std::vector<std::vector<Cell>> m(maze.size(), std::vector<Cell>(maze[0].size(), unknown));
int change = 1;
for (int i = 0; i < maze.size(); i++) {
for (int j = 0; j < ma... | ALGO | 0.998909 | 5.152028 |
ba98fa6c-0061-4c7d-b6be-3dfcee9f78a4 | jzakka/LeetCode | 0146-lru-cache/0146-lru-cache.cpp | class LRUCache {
private:
unordered_map<int, pair<int,int>> cache;
vector<int> numKey = vector<int>(200'000);
int size;
int evictIdx = 0;
int commandNum = 0;
public:
LRUCache(int capacity) {
size = capacity;
}
int get(int key) {
if (cache.find(key) == cache.end()) {
... | ALGO | 0.999406 | 5.731931 |
3a3079da-4444-40de-bd34-1c1692c70a59 | KleskBY/IrrLicht-Shooter-Example | irrBullet/3rdparty/bullet3-2.83.7/examples/MultiBody/MultiDofDemo.cpp | #include "MultiDofDemo.h"
#include "../OpenGLWindow/SimpleOpenGL3App.h"
#include "btBulletDynamicsCommon.h"
#include "BulletDynamics/Featherstone/btMultiBody.h"
#include "BulletDynamics/Featherstone/btMultiBodyConstraintSolver.h"
#include "BulletDynamics/Featherstone/btMultiBodyDynamicsWorld.h"
#include "BulletDynamic... | ALGO | 0.890483 | 6.392138 |
7f09fdfc-00e7-40c6-af4e-3effc5358f7c | yonglongliu/system | vold/Utils.cpp | #include "sehandle.h"
#include "Utils.h"
#include "Process.h"
#include <base/file.h>
#include <base/logging.h>
#include <base/stringprintf.h>
#include <cutils/fs.h>
#include <cutils/properties.h>
#include <private/android_filesystem_config.h>
#include <logwrap/logwrap.h>
#include <mutex>
#include <dirent.h>
#include ... | TOOL | 0.876555 | 4.440226 |
e451e249-93fe-4bb1-a299-58c09e4f613a | gustavo-marini/UOJProblems | 1014.cpp | #include <iostream>
#include <iomanip>
using namespace std;
int main()
{
cout << fixed << setprecision(3);
int Km;
double litros;
cin >> Km;
cin >> litros;
cout << Km / litros << " km/l\n";
return 0;
} | ALGO | 0.923748 | 4.671356 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.