uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
a908ffb0-2311-4c49-88cb-170d7c8d8dfc | idarpansharma/Resume | 0007-reverse-integer/0007-reverse-integer.cpp | class Solution {
public:
int reverse(int x) {
int ans = 0; // Initialize the reversed number to 0
while (x != 0) {
int digit = x % 10; // Get the last digit of x
// Check for overflow/underflow before updating ans
if ((ans > INT_MAX / 10) || (ans < IN... | ALGO | 0.999972 | 6.483959 |
a502d4f0-2548-434f-8ad9-6a9e157f9685 | vishaldhaygude01/LeetCode-POTD | closest_node_to_edge.cpp | class Solution {
public:
int n;
void dfs(vector<int>& edges, int startNode, vector<int>& dist_node, vector<bool>& visited) {
visited[startNode] = true;
int v = edges[startNode];
if(v != -1 && !visited[v]) {
visited[v] = true;
dist_node[v] = 1 + dist_node[startNo... | ALGO | 0.999983 | 5.841393 |
364b8f6c-f4d8-47e9-8021-15fa17f32632 | IanCortez/cpd-project | v2.cpp | #include <mpi.h>
#include <iostream>
#include <vector>
#include <cstdlib>
#include <ctime>
#include <cmath>
#include <algorithm>
// Versión 2: Implementación con estructura de grid
// - Agrega estructura de grid P x P
// - Implementa comunicación por filas y columnas
// - Agrega medición de tiempo
// - Mejora el manej... | ALGO | 0.999992 | 5.34777 |
7eef63b8-6498-4c97-a34e-2908709fa444 | CytoComp/ethereum-ObjectiveC | LocalPods/boost/1.55.0/libs/graph/example/make_maximal_planar.cpp | #include <boost/graph/make_biconnected_planar.hpp>
#include <boost/graph/make_maximal_planar.hpp>
#include <boost/graph/planar_face_traversal.hpp>
#include <boost/graph/boyer_myrvold_planar_test.hpp>
// This example shows how to start with a connected planar graph
// and add edges to make the graph maximal planar (tr... | ALGO | 0.998277 | 7.392593 |
94013c1d-3476-4a98-a05d-5fa506ba93c7 | Ayushdhaduk/Software-engneering | Module 3 Introduction to OOPS Programming/Leb_1_3.cpp | //POP vs. OOP Comparison Program
//o Write two small programs: one using Procedural Programming (POP) to calculate the
//area of a rectangle, and another using Object-Oriented Programming (OOP) with a
//class and object for the same task.
//o Objective: Highlight the difference between POP and OOP approaches.
#in... | TOOL | 0.898921 | 3.896703 |
48dc91a0-c545-4092-acd9-8c049e227ef9 | An0nym0us-s1mple/QPro | test/refactor.cpp | #include <iostream>
#include <ctime>
#include <cstdlib>
#include <vector>
#include <cmath>
#include <bitset>
#include <numeric>
#include "utils.hpp"
#include "nomask_Synthesizer4GE.hpp"
#define Dummy 0
#define SZ3 1
#define PMGARD 2
#define GE 3
using namespace MDR;
int main(int argc, char** argv){
using T = floa... | DATA | 0.97102 | 3.314966 |
e61ae8ee-2e56-449c-9298-cdc3753b8143 | Chandan017/Coder-s-Byte | 456-132-pattern/456-132-pattern.cpp | class Solution {
public:
bool find132pattern(vector<int>& nums) {
int n = nums.size();
stack<int> st;
int s3 = INT_MIN;
if(n<3)
return false;
for(int i=n-1;i>=0;i--)
{
if(nums[i] < s3)
return true;
... | ALGO | 0.999938 | 6.348048 |
9d7590c6-9b85-448b-aaac-049e99ef1040 | adarsh44444/CSES-SOLUTION | 416-partition-equal-subset-sum/partition-equal-subset-sum.cpp | class Solution {
public:
#define ll long long
ll dp[201][20001];
bool solve(int idx,vector<int> &nums,ll target){
if(idx==nums.size()) return target==0;
bool ans=false;
if(dp[idx][target]!=-1) return dp[idx][target];
ans|=solve(idx+1,nums,target);
if(target>=nums[idx]){
ans|=solve(idx+1,nums... | ALGO | 0.999965 | 5.685424 |
3e54a14b-fbbb-422d-b3ae-ce957e0b03ef | ishandutta2007/codeforces | physics0523/normal/1688/A.cpp | #include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t;
cin >> t;
while(t>0){
t--;
long long x;
cin >> x;
int z=0,o=0;
vector<int> m;
for(int i=0;i<=30;i++){
if(x&(1ll<<i)){
if(o<2){m.push_back(i);}
o++;
... | ALGO | 0.999877 | 5.13447 |
db913d70-cecb-4b9e-a791-1a08c98bd24d | irenee-14/ft_irc | src/command/channelOper/join.cpp | #include <algorithm> // find
#include "Server.hpp"
#include "Utils.hpp"
// join 시 채널에 있는 user들의 nick을 string으로 반환
const std::string Server::userList(const Channel& channel) {
std::string se = "";
std::vector<int> users = channel.getUserFds();
std::vector<int> ops = channel.getOperators();
printArg("\nusers... | WEB | 0.904508 | 4.481361 |
147a86e5-e865-49f8-b2eb-d869ef61be39 | barnwal-ankit/BasicLiveActivityMonitor | library/activity_detector_inferencing/src/edge-impulse-sdk/tensorflow/lite/micro/kernels/l2norm.cpp | #include "edge-impulse-sdk/tensorflow/lite/c/common.h"
#include "edge-impulse-sdk/tensorflow/lite/kernels/internal/portable_tensor.h"
#include "edge-impulse-sdk/tensorflow/lite/kernels/internal/reference/integer_ops/l2normalization.h"
#include "edge-impulse-sdk/tensorflow/lite/kernels/internal/reference/l2normalization... | DATA | 0.877195 | 7.434498 |
f6eb5e3f-5b1f-4730-86b1-381355e0c154 | sk-pku/OJ | 合影效果.cpp | #include<iostream>
#include<string>
#include<cstring>
#include<algorithm>
#include<math.h>
#include<map>
#include<vector>
#include<queue>
using namespace std;
bool cmpm(double a, double b) {
return a < b;
}
bool cmpf(double a, double b) {
return a > b;
}
int main() {
int n;
vector<double>m;
vector<double>f;
st... | ALGO | 0.999499 | 3.417607 |
d090a830-a305-4563-a372-22250fcef965 | trueos/trueos-ports | graphics/nurbs++/files/patch-matrix_vector_int.cpp | --- matrix/vector_int.cpp.orig 2008-02-13 22:13:23.000000000 +0100
+++ matrix/vector_int.cpp 2008-02-13 22:13:39.000000000 +0100
@@ -27,7 +27,7 @@
namespace PLib {
- void Vector<int>::qSortStd(){
+ template<> void Vector<int>::qSortStd(){
qsort((char*)memory(),n(),sizeof(int),compareInt) ;
}
| TOOL | 0.995462 | 5.886088 |
b89a3d88-3d3a-45fe-82b6-7b900ed29f96 | singhankit62000/Custom-Memory-Allocator | memory.manager/src/custom.malloc.coalescing.cpp | #include "custom.malloc.coalescing.hpp"
#include <stdlib.h>
MemoryManager :: MemoryManager ()
{
tMetaData * temp = (tMetaData *) malloc (INITIAL_BLOCK_SIZE);
vHead = nullptr;
if (temp == nullptr) {
return;
}
//temp -> uAddress = vHead;
temp -> uAvailable = true;
temp -> uNext = nu... | ALGO | 0.990449 | 5.57098 |
0d790f39-d739-4916-861b-f7710bce1342 | AlanBinu007/CodeForces-Solutions | 118A - String Task.cpp | //4005085 Jul 3, 2013 3:50:19 AM fuwutu 118A - String Task GNU C++0x Accepted 15 ms 0 KB
#include <iostream>
#include <string>
using namespace std;
int main()
{
string s, r;
cin >> s;
for (char c : s)
{
if (c >= 'A' && c <= 'Z')
{
c += 'a' - 'A';
}
if ... | ALGO | 0.998705 | 3.906434 |
eaecc590-b682-441f-8ab0-4e723de68d59 | ApoapsisAlpha/Competitive-Programming | DMOJ/aminusb.cpp | #include <bits/stdc++.h>
using namespace std;
int n, a, b;
int main() {
scanf("%d", &n);
while(n--)
{
scanf("%d %d", &a, &b);
printf("%d\n", a-b);
}
} | ALGO | 0.998725 | 3.409154 |
b4b6c70b-ea3a-4220-be60-9bd74ac6fe02 | ishubhranshu/code_soln | 0021-merge-two-sorted-lists/0021-merge-two-sorted-lists.cpp | /**
* Definition for singly-linked list.
* 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) {}
* };
*/
class Solution {
public:
ListNode* mergeTwoLis... | ALGO | 0.999864 | 5.622286 |
e52d51c3-2977-4329-8f9b-fc6377ca24fc | MHF2145/Data-Structure-2023 | Other Class/Strukdat Kelas G/Strukdur_Data/Praktikum/Praktikum_Final/Bima/PraktikumSCFinal/J.cpp | #include <bits/stdc++.h>
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define ll long long
#define MOD 1000000009
using namespace std;
int modex(int x, int y, int p){
int res = 1;
x = x % p;
if (x == 0) return 0;
while (y > 0){
if (y & 1){
res ... | ALGO | 0.999663 | 4.525512 |
afa2ef04-a6c0-468b-b181-bb0b165dc896 | DucKyWay/ku-dsa | week-01/young_mage.cpp | #include <iostream>
#include <string>
#include <vector>
using namespace std;
vector<string> split(const string& str, char space = ' ') {
vector<string> res;
string temp;
for (char ch : str) {
if (ch == space && !temp.empty()) {
res.push_back(temp);
temp.clear();
} e... | ALGO | 0.995854 | 4.310359 |
f7f56599-d300-4358-80e3-90c27ddcd554 | heavenMOJANG/ICPC | .history/programmes_C_Cpp/smtp_20250511123440.cpp | #pragma GCC optimize(1)
#pragma GCC optimize(2)
#pragma GCC optimize(3, "Ofast", "inline")
#include <bits/stdc++.h>
#define int long long
using namespace std;
constexpr int INF = 0x7fffffff;
constexpr int N = 2e5 + 10;
int n, a[N];
bool vis[N];
struct node
{
int tar,len;
bool flag;
}dp[N];
int ans;
int mx[N];
v... | ALGO | 0.999616 | 3.796844 |
8d758703-952b-4d82-8cf3-1a1f71b9a81f | Dipankar2020-ai/GFG-SELF-PLACED | Bit Magic/Two odd Occurrience/Practice Challenge.cpp | Given an unsorted array, arr[] of size N and that contains even number of occurrences for all numbers except two numbers. Find the two numbers in decreasing order which has odd occurrences.
Example 1:
Input:
N = 8
Arr = {4, 2, 4, 5, 2, 3, 3, 1}
Output: {5, 1}
Explaination: 5 and 1 have odd occurrences.
Example 2:
... | ALGO | 0.99999 | 5.31756 |
ba565089-8b7c-44b9-a4f6-918e23592f62 | anis191/Phitron | Introduction to C++/Module-2.5(Practice Day_1)/H_Sorting.cpp | #include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
int a[n];
for(int i=0; i<n; i++)
cin>>a[i];
for(int i=0; i<n-1; i++){
for(int j=i+1; j<n; j++){
if(a[i] > a[j]){
swap(a[i],a[j]);
}
}
}
for(int i=0; i<n; i+... | ALGO | 0.999993 | 3.493042 |
07189836-fa88-4a9e-a962-6b683e8a0350 | Rajan-226/CP-Stuff | CP/PBDS/ordered_set.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mod 1000000007
#define pb push_back
#define nl cout<<"\n"
#define db(x) cout<<x<<" "
#define fi(a,b) for(int i=a;i<b;i++)
#define fj(a,b) for(int j=a;j<b;j++)
#define fk(a,b) for(int k=a;k<b;k++)
#define F first
#define S second
ll fastexp(ll a... | ALGO | 0.996661 | 3.714787 |
50d10119-70d5-4ca7-ad0b-592301c83aa2 | Dras227/solve-dsa-problems | recur bin.cpp | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define endl "\n"
#define rep(i,n) for (i = 0; i < n; ++i)
#define repr(i,k,n) for (i = k; i <= n; ++i)
#define IOS ios_base::sync_with_stdio(false)
void Dungeon_Master(){ freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);}void solv... | ALGO | 0.999148 | 3.605013 |
9cbbafc0-cab5-494f-a2f3-fe4b22d6d8b1 | ishandutta2007/codeforces | ilyakor/normal/98/C.cpp | #include <iostream>
#include <algorithm>
#include <set>
#include <map>
#include <cstring>
#include <cstdio>
#include <cassert>
#include <queue>
#include <bitset>
#include <cmath>
#include <sstream>
#include <string>
#include <vector>
#define mp make_pair
#define pb push_back
#define sz(v) ((int)(v).size())
#define all... | ALGO | 0.999968 | 3.600967 |
08bf29ba-ef36-4c26-9158-769ebf5e61ce | 3301-Management/StudentWork | MusicSort-v3/Source.cpp | //Get input
//Gen. vect for feilds
//Gen. gen an arr of vectors (if noncong fill vall)
//ask usr for opp
//make sure to bounbd by ALL vals
#include <iostream>
#include <fstream>
#include <string>
#include <stdlib.h>
#include <bits/stdc++.h>
#include <aio.h>
#include <vector>
#include <regex>
using namespace std;
int... | TOOL | 0.987412 | 4.117508 |
79988946-4b37-4381-a2ab-56ee2621c7b1 | microsoft/NeuralSpeech | VideoDubber/fairseq/clib/libbleu/libbleu.cpp | #include <array>
#include <cstdio>
#include <cstring>
#include <map>
// NOLINTNEXTLINE
typedef struct {
size_t reflen;
size_t predlen;
size_t match1;
size_t count1;
size_t match2;
size_t count2;
size_t match3;
size_t count3;
size_t match4;
size_t count4;
} bleu_stat;
// left trim (remove pad)
void... | ALGO | 0.995521 | 7.152213 |
cd8c4b99-0519-47c3-af9c-cd9f4d350f42 | raincross7/code-similarity | codes/train_code/problem296/problem296_148.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
//
long long num;
long long tmp;
long long cnt = 0;
map<long long, long long> m;
cin >> num;
for (long long i = 0; i < num; i++) {
cin >> tmp;
m[tmp]++;
}
for (auto itr : m) {
if (itr.first > itr.s... | ALGO | 0.999885 | 3.65078 |
a62d510b-6394-40b2-a212-3f01da23b835 | Kujakuh/EssentiaEngine | thirdparty/opencv-4.10.0/modules/dnn/src/layers/correlation_layer.cpp | #include "../precomp.hpp"
#include "layers_common.hpp"
namespace cv { namespace dnn {
class CorrelationLayerImpl CV_FINAL : public CorrelationLayer
{
public:
CorrelationLayerImpl(const LayerParams& params)
{
setParamsFrom(params);
pad = params.get<int>("pad", 0);
CV_Assert_N(params.has... | ALGO | 0.883235 | 7.557578 |
4489958d-88f1-473c-9cc9-975e1a5749b6 | NCnguyencuong268/onl1 | CTDL>_Interchange_Sort_1.cpp | // Nguon tham khao: https://gochocit.com/ky-thuat-lap-trinh/thuat-toan-sap-xep-doi-cho-truc-tiep-interchange-sort
#include <iostream>
using namespace std;
void Interchange_Sort(int a[], int n){
int i,j;
for(i=0; i<n-1; i++){
for(j=i+1; j<n; j++){
if(a[i]>a[j]){
swap(a[i],a[j]);
}
}
}
}
| ALGO | 0.999829 | 4.409429 |
c9446e20-74ef-4bf4-b988-54b77bb27bbe | DratskayaMaria/c_long_substr | main.cpp | #include "pch.h"
#include <iostream>
#include <fstream>
#include "string.h"
#include "functions.h"
#include "exceptions.h"
//, , , LCS
void serchOfLCS(String str1, String str2);
std::ofstream out("output.txt");
int main()
{
setlocale(LC_ALL, "Russian");
std::ifstream file1 ("string1.txt");
std::ifstream fil... | ALGO | 0.893617 | 3.640612 |
c478b5f7-2ee4-4d8e-ae5c-314c52bff39a | cp-itb/contests | COMPFEST2016/qualification/D-hehehe.cpp | /**
* Contest : COMPFEST 2016 Qualification
* Team : hehehe
* Author : Aufar Gilbran
* Problem : D - Bayi Chanek
*/
#include <bits/stdc++.h>
using namespace std;
#define MAXN 1000000
int main()
{
int ans[] = { 0, 13, 23, 291, 576, 4895, 9261, 67163, 127597, 850659 };
int ntc;
scanf("%d", &ntc);... | ALGO | 0.998532 | 4.057739 |
5a2d3e5e-75bf-4dab-9f88-8e98c06a0e11 | Frztyo/2301082007_Flutter-TK2B-MOBILE | flutter_gridview/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.998436 | 6.76775 |
2d8e5ccf-8149-4d91-8836-967197f9c552 | AaronUgalde/Competitive_Programming | codeforces/A_Happy_Birthday_Polycarp.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define endl '\n'
#define all(x) (x).begin(), (x).end()
#define sz(x) int((x).size())
void solve(int testcase){
ll n; cin >> n;
vector<ll> numbers = {1, 2, 3, 4, 5, 6, 7, 8, 9};
ll ans = 0;
for(int i = 0; i<9; i++){
ll beautif... | ALGO | 0.998769 | 4.613729 |
fc152679-4723-43b5-940c-b55c62b9476f | Luigisvc/Marlin_Sources | Marlin-B1-SKR2_UBL-2.1/Marlin/src/libs/nozzle.cpp | #include "../inc/MarlinConfig.h"
#if EITHER(NOZZLE_CLEAN_FEATURE, NOZZLE_PARK_FEATURE)
#include "nozzle.h"
Nozzle nozzle;
#include "../MarlinCore.h"
#include "../module/motion.h"
#if NOZZLE_CLEAN_MIN_TEMP > 20
#include "../module/temperature.h"
#endif
#if ENABLED(NOZZLE_CLEAN_FEATURE)
/**
* @brief Stroke ... | ALGO | 0.854806 | 7.586424 |
daf09009-0665-4e17-adc8-ffcbabca70f1 | TPN-Labs/ProgressPro-Mobile | 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.99887 | 6.783439 |
bac03bd5-ca5e-4a00-8573-9cfc74554792 | MoustafaGamal01/Problem-Solving-c- | 1493. Longest Subarray of 1's After Deleting One Element.cpp | class Solution {
public:
int longestSubarray(vector<int>& nums) {
int x = nums.size(), cnt(0), ans(0);
bool ok(false);
vector<int>pfx(x, 0), sfx(x, 0);
if(x==1)return 0;
for (int i = 0; i < x; i++) {
if (nums[i] == 1) cnt++;
else cnt = 0, ok = true;
... | ALGO | 0.999958 | 5.590546 |
c04113e7-d1a3-49e1-88d3-b36bfb73767f | ananya-1109/DSA-AB | exponential.cpp | #include <iostream>
using namespace std;
int power(int m,int n){
if(n==0)
return 1;
else
return power(m,n-1)*m;
}
int power1(int m,int n){ //take less number of multiplications
if(n==0)
return 1;
if(n%2==0)
return power1(m*m,n/2);
else
return m*power1(m*m,(n-1)/2);
}
int mai... | ALGO | 0.99999 | 4.892684 |
923285f5-8baa-43bd-973e-cf353d3557bf | chipbrommer/JsonFileUpdater | json_updater.cpp | /////////////////////////////////////////////////////////////////////////////////
// @file json_updater.cpp
// @brief json file updater for console only systems.
// @author Chip Brommer
/////////////////////////////////////////////////////////////////////////////////
////////////////////... | TOOL | 0.957812 | 7.674486 |
fd30297d-d4df-4bde-9f0e-da3df8f2c51b | JanaVukovic/MATF | AISP_VEZBE/DevetiCas/DevetiPrviB.cpp | #include <iostream>
#include <vector>
using namespace std;
void particije(int n, int maxSabirak, vector<int>& particija){
if(n == 0){
for(int x : particija)
cout << x << '\n';
cout << '\n';
return;
}
if(maxSabirak > 1)
particije(n, maxSabirak - 1, particija);
... | ALGO | 0.999885 | 4.17895 |
d21e121d-f721-47b9-b8f6-729f35baf55b | pratyushchamola/codeforces | D_X_Magic_Pair.cpp | #include<bits/stdc++.h>
// #include<ext/pb_ds/assoc_container.hpp>
// #include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace chrono;
// using namespace __gnu_pbds;
#define fastio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define MOD 1000000007
#define MOD1 998244353
#define INF... | ALGO | 0.999772 | 4.580821 |
10e7619f-d777-4b5c-8a06-1aedfcc134b3 | lanlei/PD-IPC-ArmadilloDemo | Bow/Simulation/FEM/Utils.cpp | #include "Utils.h"
#include <oneapi/tbb.h>
namespace Bow {
namespace FEM {
template <class T>
BOW_INLINE void deformation_gradient(const Vector<T, 2>& x0, const Vector<T, 2>& x1, const Vector<T, 2>& x2, const Matrix<T, 2, 2>& IB, Matrix<T, 2, 2>& F)
{
F.col(0) = x1 - x0;
F.col(1) = x2 - x0;
F *= IB;
}
te... | ALGO | 0.982861 | 5.259578 |
739be830-ca2c-4ef4-a469-f5a80ad0fa5f | tmzengbi/save-code | UVA/uva1347tour(dp的奇妙状态).cpp | #include<iostream>
#include<cstdio>
#include<cstring>
#include<queue>
#include<cmath>
#include<algorithm>
using namespace std;
struct Node
{
int x,y;
}n[1010];
int N;
double dist[1010][1010],dp[1010][1010];
double getdist(Node x,Node y)
{
return sqrt((x.x-y.x)*(x.x-y.x)+(x.y-y.y)*(x.y-y.y));
}
double dfs(int i,int j)... | ALGO | 0.999284 | 3.349666 |
117c6f07-db6e-4420-83bb-1ed102c09555 | shu8Cream/atcoder-archive | atcoder.jp/abc148/abc148_e/Main.cpp | /**
* author: shu8Cream
* created: 02.03.2021 14:38:19
**/
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i=0; i<(n); i++)
#define all(x) (x).begin(), (x).end()
using ll = long long;
using P = pair<int,int>;
using vi = vector<int>;
using vvi = vector<vi>;
int main() {
cin.tie(nullp... | ALGO | 0.999959 | 4.761053 |
4a0c7927-f25a-4b44-823a-5318b1c7c109 | SEAL-IIT-KGP/randomized_caches | mirage/perf_analysis/gem5/src/systemc/tests/systemc/misc/unit/data/datawidth_signed/promote_lost_carry/datawidth.cpp | /*****************************************************************************
datawidth.cpp --
Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15
*****************************************************************************/
/**************************************************************************... | ALGO | 0.975855 | 5.298704 |
48c4916d-51a9-48e3-98d8-99a1d6a640b4 | ishandutta2007/codeforces | gisp_zjz/normal/1487/F.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int M=998244353;
const int A=200,B=330;
int dp[60][A*2+1][B*2+1],n;
string s,t;
const int inf=1e7;
void Min(int &x,int y){if (y<x) x=y;}
int main(){
cin >> t;
s="00000"+t;
n=s.size();
for (int i=0;i<=n;i++)
for (int j=0;j<=A*2;j++)
for (i... | ALGO | 0.999925 | 4.34381 |
b1fc151a-1f41-463d-83f5-e24003ca2d4c | DionEngels/GasDischarges | example_qn2t/main.cpp | #include <iostream>
#include <cmath>
#include "physconst.h"
#include "phivar.h"
//The physical radius of the grid in m.
const double grid_size = 0.0125;
//The maximum of the initialization function of Te
const double Te_max=12000;
//The minimum of the initialization function of Te
const double Te_min=11000;
//The max... | ALGO | 0.99316 | 4.551889 |
b3100e19-67f9-4bb8-8ea5-508c5085e3fc | hemoye/ACM | C_C++/算法学习/算法竞赛入门经典/第九章_动态规划/DAG模型_矩阵嵌套.cpp | #include <iostream>
#include <cstring>
#define MAXN 40
#define Swap( a, b, t ) t = a, a = b, b = t
int G[MAXN][MAXN];
int vis[MAXN];
int dp( int , int );
int main( void )
{
using namespace std;
int t, num, temp;
int a[MAXN], b[MAXN];
cin >> t;
while ( t-- ){
memset( G, 0, sizeof( G ) ... | ALGO | 0.999898 | 3.871165 |
296a479b-073f-4866-8027-ed8b55cb2239 | AlJalTtakKalSen/AlJalTtakKalSen | SooBin/231204_week/Baekjoon_2294_동전2.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> v(n); // 화폐 가치 저장
vector<int> d(k + 1, 99999); // dp수행, 99999로 초기화
for (int i = 0; i < n; i++) {
cin >> v[i];
}
d[0] = 0; // 0원을 만들 수 있는 경우의 수는... | ALGO | 0.999965 | 4.488879 |
ff290732-7929-4ae9-8b0f-46c75fe54a9a | hoangDEVteams/Home-Work-DSA | div2_15_3.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <unordered_map>
#include <math.h>
#include <queue>
#include <set>
#include <unordered_set>
#include <string>
#define ll long long
using namespace std;
void solve1() {
int n, m;
cin >> n >> m;
vector<vector<int>> a(n, vector<int>(m));
... | ALGO | 0.999951 | 5.249838 |
db13b365-a390-4a30-901b-ddd19112d549 | SuYuxi/yuxi | Algorithms/Dynamic Programming/894. All Possible Full Binary Trees.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.999976 | 6.480703 |
78011cfa-ae9e-4810-81ef-d4f501fcd08d | alpaka-group/cupla | alpaka/thirdParty/catch2/tools/misc/coverage-helper.cpp | #include <algorithm>
#include <array>
#include <cassert>
#include <fstream>
#include <iostream>
#include <memory>
#include <numeric>
#include <regex>
#include <string>
#include <vector>
std::string escape_arg(const std::string& arg) {
if (arg.empty() == false &&
arg.find_first_of(" \t\n\v\"") == arg.npos) ... | TOOL | 0.952968 | 6.002434 |
e7fcf2a5-f873-4f3e-a48c-cdf464c7b8ca | Shannju/njucser_helphelp | Algorithm算法/Code/5/.history/2_20220527163925.cpp | #define DEBUG
/*
*/
#include <iostream>
#include "stdio.h"
#include <list>
#include <vector>
#include <queue>
using namespace std;
#define INF 0x3f3f3f3f
// iPair ==> Integer Pair
typedef pair<int, int> iPair;
class Graph
{
int V;
list<pair<int, int>> *adj;
public:
Graph(int V);
void addEdge(int u, int v, i... | ALGO | 0.999933 | 3.995962 |
02b2ed11-871a-42b9-977e-ad682a956e56 | catherinexrk/CodeExercise | 复习/一阶段复习/day1.cpp | #include <stdlib.h>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
class Solution{
public:
/**
* @brief 704
* 时间复杂度 o(logn)
* 空间复杂度 o(1)
* @param nums
* @param target
*
* @return
*/
int search(vector<int>& nums, int target) {
int left = 0,righ... | ALGO | 0.99978 | 5.411135 |
38a69e83-4470-4827-911f-1e957895c1ae | StaryuX/Praktiks | 7.cpp | #include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
using namespace std;
typedef struct list_t
{
int value;
struct list_t* next;
}
OPlist;
OPlist* Push(OPlist** list, int value)
{
OPlist* node = (OPlist*)malloc(sizeof(OPlist)); // Динамическое выделение памяти для OPlist
no... | ALGO | 0.999028 | 4.224651 |
9f47c480-5ac5-49f0-8ead-fb5d85de7977 | atyoung1997/leetcode | pascalsTriangle.cpp | //#include "helpers.h"
//
//vector<vector<int>> generate(int numRows) {
// vector<vector<int>> result{};
// vector<int> starting_val{ 1 };
// result.insert(result.begin(), starting_val);
// for (int i = 1; i < numRows; i++) {
// vector<int>& prev{ result[i - 1] };
// vector<int> curr{};
// int j{ 0 };
// while (j <... | ALGO | 0.999384 | 5.398286 |
af763bea-59ed-490d-a66f-748d07c3580a | Shift118/CPP | BST/src/BST.cpp | #include <iostream>
using namespace std;
struct BstNode{
int key;
BstNode *left,*right;
};
void Insert(BstNode *& root , int key){
if(!root){
BstNode * temp = new BstNode;
temp -> key = key;
temp -> left = temp -> right = NULL;
root = temp;
}else if (key < root -> key){
Insert(root->left,key);
}else i... | ALGO | 0.99975 | 4.066954 |
476ad594-e967-4128-86f5-6fd5cc8700ab | cp-algorithms/cp-algorithms | test/test_mex.cpp | #include <cassert>
#include <map>
#include <set>
#include <vector>
using namespace std;
namespace MexSimple {
#include "mex_simple.h"
}
namespace MexLinear {
constexpr int MAX_N = 100;
#include "mex_linear.h"
} // namespace MexLinear
namespace MexUpdate {
#include "mex_updates.h"
}
struct Example {
vector<int> ar... | ALGO | 0.999842 | 5.395358 |
93fecf00-bad9-4f36-9fe0-9ea2729bd3a9 | Gowtham-M1729/HackerearthPrograms | C++/DFSCyclic.cpp | #include<stdio.h>
#include<string.h>
#include<math.h>
struct node
{
int u,v,pre;
} p[200005];
int book[200005],ans;
int find(int x)
{
return x==p[x].pre?x:find(p[x].pre);
}
void join(int p1,int p2)
{
int r1,r2;
r1=find(p1);
r2=find(p2);
if(r1!=r2)
p[r2].pre=r1;
else ans++;
}
int ... | ALGO | 0.999963 | 4.009562 |
7c9a8ddb-2afb-4686-86e2-df42745ac002 | davidhoo1988/FHEW_NTT_LIB | FHEW-ntt-128AP/modTest.cpp | #include <iostream>
#include <cstdlib>
#include "LWE.h"
#include "distrib.h"
#include <time.h>
using namespace std;
ZmodQ x, y, xy, xy1;
void help(char* cmd) {
cerr << "\nusage: " << cmd << " n\n\n"
<< " Generate two random Z_Q elements a, b, and repeat the following test n times:\n"
<< " - multiply a and ... | TEST | 0.967642 | 3.19784 |
010842bb-64e4-4e16-8ef7-bb70a4adad7b | ganesh1151/DSA-using-C- | Linked List/intersection_of_two_linked_list_method2.cpp | // The GetCount method returns the number of items in the collection.
// The collection is dynamic; the number of items in the collection reflects
// the current conditions, not the conditions when the Collection object
// was created. A closed collection will return 0 items.
//method 2
// 1) Count Node in both the... | ALGO | 0.999662 | 4.597817 |
3af2ac2b-e964-486c-a547-0669d64dfeaa | naniap1/APLIKASI-ITDEL | pam_application/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.998425 | 6.76073 |
20e73186-3a3a-481a-92a1-3735062274dd | argyrosan/complete_cuda_call_profiler | cublas/src/cublas/cublasDrotm_v2.cpp | #include <cublas_v2.h>
#include <dlfcn.h>
#include <iostream>
cublasStatus_t (*wrapper_cublasDrotm_v2)(cublasHandle_t, int, double *, int, double *, int, const double *);
//handle to the libwrapper library, used to fetch original functions with dlsym
extern void* libwrapper_handle;
extern "C"
{
cublasStatus_t cublasDr... | ALGO | 0.936146 | 5.30071 |
eaa5f9c0-ca6b-42c0-a48c-bfdb2513acd9 | ttyangf/PDFium- | core/src/fxcodec/codec/fx_codec_jpx_opj.cpp | #include "../../../include/fxcodec/fx_codec.h"
#include "codec_int.h"
#include "../fx_libopenjpeg/libopenjpeg20/openjpeg.h"
#include "../lcms2/include/fx_lcms2.h"
static void fx_error_callback(const char *msg, void *client_data)
{
(void)client_data;
}
static void fx_warning_callback(const char *msg, void *client_da... | TOOL | 0.917668 | 6.738008 |
b376d2cc-ccee-4b64-a784-1f22376eeaad | KritikaBassi/DSA-with-Cpp | FindUniqueElement.cpp | // INCOMPLETE
#include <iostream>
using namespace std;
int unique1(int a[], int n)
{
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
if (a[i] == a[j])
{
break;
}
else{
return a[i];
}
... | ALGO | 0.99618 | 4.733202 |
06e0b666-6921-4cc2-b368-45754ab0f552 | asaddthealien/OOP-Labs | Lab1/Task2.cpp | #include <iostream>
#include <string>
using namespace std;
int main(int argc, char *argv[])
{
int sum = 0;
for(int i = 1; i < argc; i++)
{
sum += stoi(argv[i]);
}
cout<<"Sum = "<< sum<<endl;
return 0;
} | ALGO | 0.974738 | 4.152188 |
e4ef9466-27cd-4a24-85e4-e3da94563179 | prashantpcm94/Hackerrank-30-days-of-Code | C++/Day18.cpp | #include<bits/stdc++.h>
using namespace std;
class Palindrome {
stack <char> s;
queue <char> q;
public :
void pushCharacter(char ch){
s.push(ch);
}
void enqueueCharacter(char ch){
q.push(ch);
}
char popCharacter(){
char c=s.top();
s.pop();
return c... | ALGO | 0.9995 | 4.269991 |
4c8f03a6-e62c-4432-997f-a6c57abd1157 | ishandutta2007/codeforces | laycurse/normal/1220/E.cpp | #pragma GCC optimize ("Ofast")
#include<bits/stdc++.h>
using namespace std;
void *wmem;
char memarr[96000000];
template<class T> inline void walloc1d(T **arr, int x, void **mem = &wmem){
static int skip[16] = {0, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1};
(*mem) = (void*)( ((char*)(*mem)) + skip[((unsigned... | ALGO | 0.999985 | 3.750946 |
bd486841-aef7-4278-ad38-9dbd7401b92e | ayushi0809/leetcode-problem | 36-valid-sudoku/36-valid-sudoku.cpp | class Solution {
public:
bool isValidSudoku(vector<vector<char>>& board) {
unordered_map<int,unordered_set<int>>row;
unordered_map<int,unordered_set<int>>col;
int n = board.size();
// int m = board[0].size();
// cout<<'5'-'0'<<endl;
for(int i =0; i<n; i++){
... | ALGO | 0.999397 | 6.091753 |
b2df785a-77ed-415d-a902-bbc13cd23118 | nabinbhakat/Visual-Studio | c++/Binarytree.cpp | #include<bits/stdc++.h>
using namespace std;
struct Node
{
int data;
struct Node *left;
struct Node *right;
Node(int x){
data=x;
left=NULL;
right=NULL;
}
};
//preorder(Ro L R)
void preorder(Node *root){
if(root==NULL)
return;
cout<<root->data<<" ";
preo... | ALGO | 0.999915 | 4.41773 |
e72dc6f9-9cfd-41db-a11c-5618c2f8e072 | Nexus-Agni/C-_DSA-Algo | pascalTriangle.cpp | #include<iostream>
using namespace std;
// Printing Pascal triangle using functions
int fact(int n) {
int factorial = 1;
for (int i=1; i<=n; i++) {
factorial = factorial * i;
}
return factorial;
}
int main() {
int n;
cout<<"Enter number: ";
cin>>n;
for (int i=0; i<n; i++) {
for (int j=0; j<=i; ... | ALGO | 0.99949 | 5.443457 |
6735772b-0e17-4110-a325-5a15529126e2 | AnshulShirbhate/DSA-CPP | DP(Dynamic Programming)/ImportantKFrogJump.cpp | #include <bits/stdc++.h>
using namespace std;
int solve(int n, vector<int> &heights, vector<int> &dp, int k){
if(n == 0){
return 0;
}
if(dp[n] != -1){
return dp[n];
}
int mini = INT_MAX;
for(int i=1; i<=k; i++){
if(n-i >= 0){
int step = solve(n-i, heights, dp... | ALGO | 0.9999 | 4.740259 |
86a55f97-6471-41af-b244-9e553f759e4d | liuchaofann/JavaScriptCore | dfg/DFGCPSRethreadingPhase.cpp | #include "config.h"
#include "DFGCPSRethreadingPhase.h"
#if ENABLE(DFG_JIT)
#include "DFGBasicBlockInlines.h"
#include "DFGGraph.h"
#include "DFGPhase.h"
#include "JSCInlines.h"
namespace JSC { namespace DFG {
class CPSRethreadingPhase : public Phase {
public:
CPSRethreadingPhase(Graph& graph)
: Phase(g... | ALGO | 0.912061 | 7.17213 |
6438a551-f370-4038-b18b-0e01f1428383 | jastrzomb/gra_othello | gra.cpp | #include<stdio.h>
#include<time.h>
#include <stdlib.h>
#include "menu.h"
#include "engine.h"
#define white 1
#define black -1
#define n 8
//okreslenie czyja tura
void tura(int x)
{
if (x == 0)
{
printf("\ntura bialych\n");
}
else
{
printf("\ntura czarnych\n");
}
}
int main()
{
srand((unsigned int)time(NULL)... | ALGO | 0.966105 | 4.496025 |
7c0c388e-7e79-4ba7-9b2d-e7b8343dbcd3 | akadjoker/gmogre3d | Newton/sdk/dMath/dQuaternion.cpp | #include "dStdAfxMath.h"
#include "dMathDefines.h"
#include "dVector.h"
#include "dMatrix.h"
#include "dQuaternion.h"
dQuaternion::dQuaternion (const dMatrix &matrix)
{
enum QUAT_INDEX
{
X_INDEX=0,
Y_INDEX=1,
Z_INDEX=2
};
static QUAT_INDEX QIndex [] = {Y_INDEX, Z_INDEX, X_INDEX};
dFloat *ptr;
dFloat trace... | ALGO | 0.93553 | 6.941041 |
00ce661d-3cf0-4a54-9fb8-bd57e06f80ab | yinyanghu/OI | OJ/usaco/cpp/fracdec.cpp | /*
ID:oifox20071
LANG:C++
PROG:fracdec
*/
#include <iostream>
#include <cstring>
using namespace std;
const int limitsize = 100000;
int record[limitsize], flag[limitsize];
string s = "";
void print(char ch)
{
s += ch;
if (s.length() == 76)
{
cout << s << endl;
s = "";
}
}
int main()
{
freopen("fracdec.in", "r"... | ALGO | 0.999799 | 3.711097 |
4dda6876-4887-4045-9478-63a90c0aa975 | mkolleck/AdventOfCode | 2020/16.cpp | // https://adventofcode.com/2020/day/15
#include <iostream>
#include <limits>
#include <regex>
#include <sstream>
struct Rule
{
int position;
std::string field;
std::pair<int, int> range1;
std::pair<int, int> range2;
std::vector<int> matched;
bool operator<(const Rule& o) const
{
... | ALGO | 0.996971 | 5.837735 |
8e5c1ecd-a86b-497b-99dd-cc1cc75849c6 | taoonehacker/MayBeNotToday | E-Book/剑指Offer第二版/Source code/53_03_IntegerIdenticalToIndex/IntegerIdenticalToIndex.cpp | //==================================================================
// ָOfferԹپͱ⡷
// ߣκ
//==================================================================
// 53ֵ±ȵԪ
// ĿһÿԪضΨһġʵ
// һҳһֵ±Ԫء磬{-3, -1,
// 1, 3, 5}У3±ȡ
#include <cstdio>
int GetNumberSameAsIndex(const int* numbers, int length)
{
if(numbers == nullp... | ALGO | 0.999716 | 4.889069 |
341114df-9c12-4ffc-abde-04f4b8561438 | prakhs123/standalone-programs | c++/pair.cpp | #include <iostream>
#include <algorithm>
using namespace std;
struct compare {
bool operator(const pair<int,int>& lhs, const pair<int,int>& rhs)
{
return lhs.first < rhs.first;
}
};
int main()
{
pair <int, int> c[4];
c[0]=make_pair(3,7);
c[1]=make_pair(1,9);
c[2]=make_pair(5,11);
c[3]=make_pair(4,3);
sort(c... | ALGO | 0.999819 | 3.930724 |
e63a2ba6-8eb1-414b-a7d3-ff2fd2f347a9 | gstrick2/sboost | 3rdparty/manticore/manticoresearch/src/tests.cpp | #include "sphinx.h"
#include "sphinxexpr.h"
#include "sphinxutils.h"
#include "sphinxquery.h"
#include "sphinxrt.h"
#include "sphinxint.h"
#include "sphinxstem.h"
#include <math.h>
#define SNOWBALL 0
#define CROSSCHECK 0
#define PORTER1 0
#if SNOWBALL
#include "header.h"
#include "api.c"
#include "utilities.c"
#inclu... | TEST | 0.928529 | 5.640832 |
84b3b298-1e42-44e4-8149-0139bb9bcba2 | brianshih95/Introduction-to-Algorithms | HW0/3/main.cpp | #include <bits/stdc++.h>
using namespace std;
int a[1001], c[10001];
double b[1001];
double tax(int salary, int n){
double pay = 0;
for(int i = n - 1; i >= 0; i--){
if(salary >= a[i]){
pay += (salary - a[i] + 1) * b[i];
for(int j = i; i > 0; i--)
pay += (a[i] - a[... | ALGO | 0.999231 | 3.362926 |
6ee75197-9f92-4355-bc8c-4049fc592a62 | pasha6063/DSA_LAB | lab12/task3.cpp | #include <iostream>
#include <vector>
#include <ctime>
using namespace std;
void swap(int &a, int &b)
{
int temp = a;
a = b;
b = temp;
}
// Function to select a random pivot and partition the array
int partitionRandomPivot(vector<int> &arr, int low, int high)
{
// Select a random index between low and... | ALGO | 0.999548 | 6.796956 |
1028df95-757c-4c00-ac3c-7edeee5f5acf | Muhammad-Ibrar727/Assignments-Sem-III | binary_search.cpp | #include<iostream>
using namespace std;
int Binary_search(int arr[], int lb, int ub,int item,int loc)
{
int beg,end,mid;
beg=lb;
end=ub;
mid=int((beg+end)/2);
while(beg<=end && arr[mid]!=item)
{
if(item<arr[mid])
{
end=mid-1;
}
else
{
beg=mid+1;
}
mid=int((beg+end)/2);
}
if(arr[mid]=... | ALGO | 0.999977 | 5.073502 |
01291e6b-34d4-4a86-8634-6de14ddbed23 | bolidehi/ardupilot | libraries/AP_AHRS/AP_AHRS_DCM.cpp | #include "AP_AHRS_config.h"
#if AP_AHRS_DCM_ENABLED
#include "AP_AHRS.h"
#include <AP_HAL/AP_HAL.h>
#include <GCS_MAVLink/GCS.h>
#include <AP_GPS/AP_GPS.h>
#include <AP_Baro/AP_Baro.h>
#include <AP_Compass/AP_Compass.h>
#include <AP_Logger/AP_Logger.h>
#include <AP_Vehicle/AP_Vehicle_Type.h>
extern const AP_HAL::HAL... | TOOL | 0.908747 | 3.773632 |
405c6217-403e-4456-bd9a-35175a02bc78 | Mrliu88888888/SeetaFace6 | TenniS/src/backend/base/base_reduce_mean.cpp | //
// Created by kier on 2019/7/23.
//
#include "backend/base/base_reduce_mean.h"
#include <utils/assert.h>
#include <numeric>
#include <backend/name.h>
#include <core/tensor_builder.h>
#include <iterator>
namespace ts {
namespace base {
ReduceMean::ReduceMean() {
field("dims", REQUIRED);
... | TOOL | 0.967075 | 6.50934 |
f2a062e5-562e-403e-96df-fd63a24ca56f | codshashank1/greeting_on_first_pr | AA.cpp | // #include <iostream>
// using namespace std;
// #include <stack>
// You have to grow from inside out ! None can teach you, none can make you spiritual ! There's no other teacher but your own soul !"
// - Swami Vivekananda.
// struct node{
// int data;
// node* next;
// };
// class mySta... | ALGO | 0.998864 | 3.884013 |
1b2cdc43-a064-44e1-8d19-c580d2e09543 | batorovic/studyLib | Algoritma Ve Programlama (C)/1.1/FİNAL/Final 2018/Final 2018 - Soru3.cpp | #include <stdio.h>
#include <string.h>
void AyarCek(char str[])
{
for(int i = 0;i<strlen(str);i++)
{
if(i % 2 == 0)
{
if(str[i] >= 'A' && str[i] <= 'Z')
{
str[i]+=32;
}
}
else
{
if(str[i] >= 'a' && str[i] <= 'z')
{
str[i]-=32;
}
}
}
printf("%s",str);
}
int main()
{
char met... | ALGO | 0.984114 | 3.980417 |
f44f74e5-744c-42d5-bce7-0359d8fcd7d9 | bobleblob123/yuzu-android | src/shader_recompiler/backend/glasm/emit_glasm_integer.cpp | #include "shader_recompiler/backend/glasm/emit_glasm_instructions.h"
#include "shader_recompiler/backend/glasm/glasm_emit_context.h"
#include "shader_recompiler/frontend/ir/value.h"
namespace Shader::Backend::GLASM {
namespace {
void BitwiseLogicalOp(EmitContext& ctx, IR::Inst& inst, ScalarS32 a, ScalarS32 b,
... | TOOL | 0.865889 | 7.342521 |
12efe24c-cfeb-4a96-9e91-b923e7a1ec97 | johnpzh/parallel_ANNS | include/efanna2e/index_nsg.202204201951.omp_profile_multi_queues.cpp | #include "index_nsg.202204201951.omp_profile_multi_queues.h"
#include <omp.h>
#include <bitset>
#include <chrono>
#include <cmath>
#include <boost/dynamic_bitset.hpp>
#include "exceptions.h"
#include "parameters.h"
namespace efanna2e {
#define _CONTROL_NUM 100
IndexNSG::IndexNSG(const size_t dimension, const size_t ... | ALGO | 0.999569 | 4.665378 |
1cbb98e7-020f-473c-83c4-eaecec80e3c7 | noblewhale/RakNetZebStyle | DependentExtensions/cat/src/math/edward/io/PtNormalize.cpp | #include <cat/math/BigTwistedEdwards.hpp>
using namespace cat;
// Compute affine coordinates for (X,Y), set Z=1, and compute T = xy
void BigTwistedEdwards::PtNormalize(const Leg *in, Leg *out)
{
// A = 1 / in.Z
MrInvert(in+ZOFF, A);
// out.X = A * in.X
MrMultiply(in+XOFF, A, out+XOFF);
MrReduce(ou... | ALGO | 0.99598 | 4.559836 |
1d873b06-b20a-481c-b9cd-adcf7f2376d1 | saraycanarteg/Estructura-de-Datos | TrabajosDomi/Tetrisio/Juego.cpp | #include "Juego.h"
#include <cstdlib>
#include <ctime>
Letra::Letra() : valor('A'), posX(ANCHO_TABLERO / 2), posY(0) {}
Letra::Letra(char letra) : valor(letra), posX(ANCHO_TABLERO / 2), posY(0) {}
Letra::Letra(char letra, int x, int y) : valor(letra), posX(x), posY(y) {}
void Letra::establecerValor(char letra) {
... | ALGO | 0.974899 | 5.873278 |
fcece1d1-eb27-45fa-a3e6-baf1a96cee71 | milk88101524/Kebuke | 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.998799 | 6.776823 |
1a25647a-335e-4400-b5b9-efb516b52a14 | ShahJahanApurbo/cp | A_Bazoka_and_Mocha_s_Array.cpp | #include <bits/stdc++.h>
using namespace std;
#define fastio() \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL)
#define MOD 1000000007
#define MOD1 998244353
#define INF 1e18
#define nline "\n"
#define pb push_back
#define ppb pop_back
#define mp... | ALGO | 0.999964 | 5.646844 |
7564f1ad-be6f-4cc8-9e70-a45834ec8497 | 0x07dc/none | juce_modules/juce_box2d/box2d/Dynamics/Contacts/b2EdgeAndPolygonContact.cpp | #include "b2EdgeAndPolygonContact.h"
#include "../../Common/b2BlockAllocator.h"
#include "../b2Fixture.h"
#include <new>
using namespace std;
b2Contact* b2EdgeAndPolygonContact::Create(b2Fixture* fixtureA, int32, b2Fixture* fixtureB, int32, b2BlockAllocator* allocator)
{
void* mem = allocator->Allocate(sizeof(b2Edge... | ALGO | 0.975911 | 6.882998 |
32bc77ce-5348-4923-a69c-81555b0aebf2 | Injarapugc/cpcodes | A_Level_Statistics.cpp | #include <bits/stdc++.h>
#define forn(i, n) for (int i = 0; i < int(n); i++)
using namespace std;
int main() {
int tc;
scanf("%d", &tc);
while (tc--){
int n;
scanf("%d", &n);
int p = 0, c = 0;
bool fl = true;
forn(i, n){
int x, y;
scanf("%d%d", &x, &y);
if (x < p || y < c || y-c > x-p )
fl ... | ALGO | 0.999819 | 3.962494 |
b5748bf4-945f-46f6-bd89-3cd1929c4b74 | b21727432/HackerRank | c ödevler/1117.cpp | #include<stdlib.h>
#include<stdio.h>
#include<string.h>
int main(){
int i = 1, toplam = 0;
while(1){
int agirlik;
printf("%d.Malzemenin agirligini girin : ", i);
scanf("%d", &agirlik);
if(agirlik == -1){
printf("Kamyona %d malzeme Yuklendi.\n", i-1);
printf("Malzemelerin Toplam Agirligi : %d", toplam... | TOOL | 0.970501 | 3.013309 |
c3e36068-0ccc-454b-ad07-95af11d267b5 | rahul22mrk/hackoctoberfest2021 | TreeTraversals/diameter_of_binary_tree.cpp | class Solution {
int f(TreeNode *root, int &ans)
{
if(!root)
return 0 ;
int left = f(root->left , ans);
int right = f(root->right, ans);
ans = max( ans,1 + left + right);
return 1 + max(left,right);
}
public:
int diameterOfBinaryTree(TreeNode* roo... | ALGO | 0.999726 | 6.110291 |
c6539878-6c17-4131-8cec-defdd116be41 | patrickMorkos/inventory_management_system_mobile | 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.998799 | 6.776823 |
419561b2-ca76-49b2-ba16-bbfd86d88ac3 | LyTrungLucky/CTDLGT1 | SinhVien.cpp | #include <iostream>
#include <string>
#include "LinkedList.h"
using namespace std;
struct SinhVien {
long maSo;
string hoTen;
string ngaySinh;
string queQuan;
double diem;
};
// Hàm xuất 1 SV
void xuatSV(const SinhVien& sv) {
cout << "MSSV: " << sv.maSo << "\n";
cout << "Ho ten: " << sv.hoTen << "\n";
cout <<... | ALGO | 0.999517 | 3.851254 |
e0e0ae07-8157-4d4f-b212-4a8f462bb591 | priyashree15/placement_preps | APAC/paranth.cpp | #include <iostream>
#include <list>
#include <algorithm>
#include <vector>
#include <stack>
#include <limits.h>
#include <iostream>
#include <fstream>
#include <string.h>
using namespace std;
class Solution
{
public:
int palin(int l,int r)
{
// cout<<"here";
if(!l && !r)return 1;
if(l<0 || r<0)return 0;
int t... | ALGO | 0.996261 | 3.852171 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.