uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
a168011d-59e0-4df3-b4a3-755e1e471479 | HaochenLiu/My-LeetCode-CPP | 301.cpp | /*
301. Remove Invalid Parentheses
Remove the minimum number of invalid parentheses in order to make the input string valid. Return all possible results.
Note: The input string may contain letters other than the parentheses ( and ).
Examples:
"()())()" -> ["()()()", "(())()"]
"(a)())()" -> ["(a)()()", "(a())()"]
")(... | ALGO | 0.999866 | 5.794252 |
e4bbdc76-e1fc-4dff-b7bd-e1f3ba76a175 | minhnguyet14/Temp_data | danhSachLienKet_clb_Untitled1.cpp | #include <stdio.h>
#include <stdlib.h>
typedef int item; // dinh nghia item
struct Node{
item Data;
Node *Next;
};
typedef Node *List; //dinh nghia danh sach
//Khoi tao rong
void init (List &L){
L=NULL;
}
//Kiem tra rong
int isempty (List L){
return (L==NULL);
}
//Tinh do dai
int len(List L){
Node *P=L;
int ... | ALGO | 0.997752 | 3.418509 |
ac0f8a16-d299-48bd-8ab9-fdf87a49768a | likethestarsF/Backjun-Saves | _Silver/16461.cpp | // 240817 1 #16461
// Random Marathon 11 H
// 00:30
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
class my {
int testN;
int MinButton(const int &freq, const int &tar) {
int MIN = 6; // manual input by numpad
// 1. target = cur
if (freq == tar)
return 0;
// ... | ALGO | 0.992425 | 3.475613 |
6d204230-8aba-46c2-9e9e-04a68e21f6f3 | HANDS-FREE/OpenRE | 4_Thirdparty/Eigen3/doc/examples/TutorialLinAlgExSolveColPivHouseholderQR.cpp | #include <iostream>
#include <Eigen/Dense>
using namespace std;
using namespace Eigen;
int main()
{
Matrix3f A;
Vector3f b;
A << 1,2,3, 4,5,6, 7,8,10;
b << 3, 3, 4;
cout << "Here is the matrix A:\n" << A << endl;
cout << "Here is the vector b:\n" << b << endl;
Vector3f x = A.colPivHouseholderQr... | ALGO | 0.999918 | 3.356631 |
9715516a-d62f-4242-b4b4-3e05b60633c7 | raincross7/code-similarity | codes/train_code/problem096/problem096_274.cpp | #include<bits/stdc++.h>
using namespace std;
int main(){
int n, m;
string a, b, c;
cin>>a>>b>>n>>m>>c;
if(a==c)
n--;
else if(b==c)
m--;
cout<<n<<" "<<m;
return 0;
}
| ALGO | 0.999487 | 3.225446 |
939b413e-3624-4f17-88f0-4b0edc676053 | CTranLam/DSA_PTIT | Dynamic Programing/DSA05036 TangGiam.cpp | #include<iostream>
#include<vector>
#include<algorithm>
#define ll long long
#define p(x) pair<x,x>
#define v(x) vector<x>
#define FORD(i,l,r) for(int i=l;i<r;i++)
#define FORE(i,l,r) for(int i=r-1;i>=0;i--)
#define correct(x,y,n,m) (0<=(x)&&(x)<(n)&&0<=(y)&&(y)<(m))
#define sz size();
#define all(M) M.begin(),M.end()... | ALGO | 0.999723 | 3.682741 |
b8a4afac-03c3-4a0d-8d85-4cf657986015 | mahimalmuntashir/CodeForces | CodeforcesEDU/BinarySearch3D-MinimumMaximumOnThePath-OLD.cpp | #include <cstdio>
#include <vector>
#include <algorithm>
typedef long long ll;
struct road{ll from, to, val;};
bool roadCompare(road x, road y){return x.from < y.from;}
std::vector<ll> findPath(const std::vector<road> &a, ll n, ll d, ll x){
std::vector<std::vector<ll> > g(n + 1);
//This needs to be done with ... | ALGO | 0.999954 | 3.948992 |
9f5db8c6-6755-4cf5-90ed-552b10f29d41 | ishandutta2007/codeforces | moransky/normal/993/D.cpp | // Skyqwq
#include <bits/stdc++.h>
#define pb push_back
#define fi first
#define se second
#define mp make_pair
using namespace std;
typedef long long LL;
template <typename T> void chkMax(T &x, T y) { if (y > x) x = y; }
template <typename T> void chkMin(T &x, T y) { if (y < x) x = y; }
template <typename T> void... | ALGO | 0.999976 | 3.938088 |
f9292d90-08b4-465e-a766-a6b0e2e7d5e3 | mdunggggg/CPP_Code_PTIT | CPP0241.cpp | /* Hoang Manh Dung - D21 ProPTIT */
#include<bits/stdc++.h>
using namespace std;
#define Faster() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define fix(a) cout << fixed << setprecision(a);
const double PI = 2*acos(0);
const int MOD = 1e9 + 7;
const int MAX = 1e6 + 5;
int n;
void Process(){
ci... | ALGO | 0.999433 | 4.571282 |
b432f565-ef70-4cc4-80fa-544906936efd | omarrayyann/Data-Structures | SingleLinkedList.cpp | #include<iostream>
using namespace std;
class Node{
private:
int element;
Node* next;
public:
Node(int element){
next = NULL;
this->element = element;
}
friend class SingleLinkedList;
};
class SingleLinkedList{
private:
Node* head... | ALGO | 0.986994 | 3.820527 |
87db3d59-64b1-487a-81cb-a1f1741a7dea | ishandutta2007/codeforces | andreasyan/normal/856/B.cpp | #include <bits/stdc++.h>
using namespace std;
#define m_p make_pair
#define all(x) (x).begin(),(x).end()
#define sz(x) ((int)(x).size())
#define fi first
#define se second
typedef long long ll;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
mt19937 rnf(2106);
const int N = 1000006;
int n;
char a[... | ALGO | 0.999973 | 4.161235 |
4334611f-1a79-46f8-8e2a-5a7ca7f17f8e | Abhay016/Dsa-Topic-wise-solved-problem | Recursion and BackTracking/SubsetSum.cpp |
#include <bits/stdc++.h>
using namespace std;
void subsetSum(vector<int> arr, int i, int sum, vector<int> &res)
{
if (i == arr.size())
{
res.push_back(sum);
return;
}
subsetSum(arr, i + 1, sum, res);
subsetSum(arr, i + 1, sum + arr[i], res);
}
vector<int> subsetSums(vector<int> arr... | ALGO | 0.999929 | 5.355745 |
993ba5b6-7af1-4e66-9937-6a7a059a8989 | vlluvia/algorithm | leetcode/[112]-路径总和.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
bool flag = false;
bool hasPathSum(TreeNode* root, int sum) {
if(root == NULL) retu... | ALGO | 0.999985 | 6.073395 |
77fab666-f8a8-4a33-905d-02a70577d142 | jinjjij/baekjoon | CPP/solved/13549 - 숨바꼭질3/main.cpp | #include <iostream>
#include <queue>
#include <vector>
typedef struct node{
int pos;
int level;
} node;
int main(){
std::ios::sync_with_stdio(false);
std::cin.tie(NULL);
std::cout.tie(NULL);
int n , k;
bool visited[200001] = {false};
//int parent[200001] = {-1};
std::cin >> n >> k... | ALGO | 0.999977 | 3.857991 |
7b93f9f8-23a3-4b82-aa87-0e92aff21fef | Seann0425/ZeroJudge-Solution | D/d074.cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
int n,s,M=0;
cin >> n;
for(int i=0;i<n;i++){
cin >> s;
M = max(s,M);
}
cout << M;
}
| ALGO | 0.999458 | 3.852827 |
e570d9e9-8325-45a0-adcb-ae63920a059e | monkey531/llama.cpp | examples/parallel/parallel.cpp | // A basic application simulating a server with multiple clients.
// The clients submit requests to the server and they are processed in parallel.
#include "arg.h"
#include "common.h"
#include "sampling.h"
#include "log.h"
#include "llama.h"
#include <cmath>
#include <cstdio>
#include <string>
#include <vector>
#incl... | TOOL | 0.941048 | 7.097411 |
f3f5d711-964c-4eed-8311-04374b3b4349 | jjcook/velour | src/pg_tipClipping.cpp | //
// pg_tipClipping.cpp
//
#include "types.h"
// TODO: configurable parameter?
#define TIP_REMOVAL_LENGTH (2 * g__FULLKMER_LENGTH)
static counter_t g_minimum_edge_weight = 2; // TODO: configurable parameter?
//********************************************************************************
//*********************... | ALGO | 0.965412 | 4.367193 |
f25aa9ad-12f5-4307-ac10-cd7959d9ee4b | ZhangYu-zjut/PAT_Code | PAT/PAT (Advanced Level)/1075/main.cpp | #include <iostream>
#include <stdio.h>
#include <algorithm>
#include <map>
#include <string>
#include <string.h>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
struct student
{
int id;
int total=-1;
int score[6]={-1,-1,-1,-1,-1,-1};
int per... | ALGO | 0.999439 | 3.01417 |
ba7be91c-90db-4ec5-87ad-26ade00afa45 | huangallen2008/cppcode | code/codeforces/edu/Segment_Tree(part 2)/Step4/D/D.cpp | #include<bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O3,unroll-loops,fast-math")
// #pragma GCC target("avx2,bmi,popcnt")
#define int long long
#define REP(i,n) for(int i=0;i<(n);i++)
#define REP1(i,n) for(int i=1;i<=(n);i++)
#define RREP(i,n) for(int i=(n)-1;i>=0;i--)
#define RREP1(i,n) for(int i=(n);i>=... | ALGO | 0.999112 | 4.861276 |
a6fd0ce3-ee3d-4e62-82fe-93efffaa91e0 | wfystx/LeetCodeDailyPractice | LinkedList/25ReverseNodesink-Group.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode* reverseKGroup(ListNode* head, int k) {
if(!head || k == 1) return head;
ListNode *dummy = new ListNode(0);... | ALGO | 0.999991 | 5.650061 |
932c177c-8737-41b8-b313-180cc1c17daf | arpharutyunyan/Cpp_Python | ll.template.cpp | #include <iostream>
using namespace std;
template<class T>
class Node{
public:
T value = 0;
Node* previous = nullptr;
Node* next = nullptr;
Node(int n){
value = n;
}
};
template<class T>
class LinkedList{
public:
Node<T>* head = nullptr;
... | ALGO | 0.999532 | 4.323368 |
e79d23f5-c73f-4875-b4d2-38ab817c393a | Francklyi/Game-Shot | jni/game/math/m_math.cpp | #include "m_math.h"
float InvSqrt(float x)
{
float xhalf = 0.5f*x;
int i = *(int*)&x; // get bits for floating VALUE
i = 0x5f375a86- (i>>1); // gives initial guess y0
x = *(float*)&i; // convert bits BACK to float
x = x*(1.5f-xhalf*x*x); // Newton step, repeating increases accuracy
return x;
}
| ALGO | 0.999159 | 4.212419 |
f9b22c9f-4434-402c-8930-1a2fc88e3385 | KhangPham205/ControlStructeExercise | LTMHC/047/Source.cpp | #include <iostream>
#include <iomanip>
using namespace std;
void TaoMaTran(float[][500], int&, int&);
void XuatMaTran(float[][500], int, int);
float TongBien(float[][500], int, int);
int main()
{
float a[500][500];
int m, n;
TaoMaTran(a, m, n);
cout << "Ma tran duoc tao: " << endl;
XuatMaTran(a, m, n);
cout <<... | ALGO | 0.950526 | 3.244385 |
1d445940-b11a-4d2e-af34-c41481de2795 | yuruhi/library | Utility/VectorOperation.cpp | #pragma once
#include <vector>
#include <cassert>
template <class T> auto Rotated90(const std::vector<std::vector<T>>& a) {
std::size_t h = a.size(), w = a.front().size();
std::vector<std::vector<T>> result(w, std::vector<T>(h));
for (std::size_t i = 0; i < h; ++i) {
assert(a[i].size() == w);
for (std::size_t j... | ALGO | 0.916099 | 6.341095 |
1b8e702b-8123-41ac-aa96-1fec81679abf | Agam3108/Data_Structures-n-Algorithms | 1350-remove-sub-folders-from-the-filesystem/1350-remove-sub-folders-from-the-filesystem.cpp | class Solution {
public:
vector<string> removeSubfolders(vector<string>& folder) {
int n = folder.size();
sort(folder.begin(),folder.end());
vector<string> ans;
ans.push_back(folder[0]);
for(int i = 1;i<n;i++){
string s = ans.back();
s += '/';... | ALGO | 0.998003 | 5.071578 |
78dec8a5-5aff-4100-b41d-5d7a9cad6f8d | RoumaisaTanveer/LeetCode_Problems | 46_permutation.cpp | #include <bits/stdc++.h>
using namespace std;
class Solution {
void backtrack(vector<int>& nums, vector<bool>& used, vector<int>& current, vector<vector<int>>& result) {
if(current.size()==nums.size()){
result.push_back(current);
return;
}
fo... | ALGO | 0.999993 | 6.251167 |
f26adb12-f091-4250-a02d-4fa3ba9f8044 | JoKeR-VIKING/DS_Algo | Coding Ninjas/Time And Space Complexity Analysis/checkArrayRotation.cpp | // You have been given an integer array/list(ARR) of size N. It has been sorted(in increasing order) and then rotated by some number 'K' in the right hand direction.
// Your task is to write a function that returns the value of 'K', that means, the index from which the array/list has been rotated.
// Input format :
// ... | ALGO | 0.998121 | 5.619479 |
2a806038-9380-4418-b208-1fc8aafa051c | TensorMD/lammps-tensormd | lib/linalg/dsteqr.cpp | #ifdef __cplusplus
extern "C" {
#endif
#include "lmp_f2c.h"
static doublereal c_b9 = 0.;
static doublereal c_b10 = 1.;
static integer c__0 = 0;
static integer c__1 = 1;
static integer c__2 = 2;
int dsteqr_(char *compz, integer *n, doublereal *d__, doublereal *e, doublereal *z__, integer *ldz,
doublereal *wo... | ALGO | 0.999762 | 3.178159 |
8d3ded62-ba89-496d-b82e-d6900aff67e2 | Itachi1905/dsa | STL/Priority_Queue.cpp | #include<iostream>
#include<queue>
using namespace std;
int main() {
// max heap
priority_queue<int> maxi;
// min heap
priority_queue<int,vector<int>,greater<int> >mini;
maxi.push(1);
maxi.push(3);
maxi.push(2);
maxi.push(0);
int n=maxi.size();
for (int i = 0; i < n; i++) {
... | ALGO | 0.999112 | 4.045522 |
03c179a3-df8f-42e3-9a65-12ca4ba64ed8 | phplpf/Cplusplus | stl/day02/baselist.cpp | #include <iostream>
#include <stdexcept>
using namespace std;
template<class T>class list{
public:
//
//缺省构造
//
list():m_head(NULL),m_tail(NULL){}
//
//拷贝构造
//
list(const list& that):m_head(NULL),
m_tail(NULL){
for(node* pnode=that.m_head;
pnode; pnode=pnode->m_next){
... | TOOL | 0.915435 | 4.577347 |
77f969c0-780d-4d25-92f8-efc442f746c4 | mateor/pdroid | android-2.3.4_r1/tags/1.32/frameworks/base/media/libstagefright/codecs/amrwb/src/qpisf_2s.cpp | /*
------------------------------------------------------------------------------
Filename: qpisf_2s.cpp
Date: 05/08/2007
------------------------------------------------------------------------------
REVISION HISTORY
Description:
----------------------------------------------------------------------------... | ALGO | 0.998679 | 7.022768 |
9718bab1-5b59-4969-aebf-7c38e7ecf233 | surinkim/learning_cpp_functional_programming_kor | VS2017/Chapter02/fold_2/fold2.cpp | // fold2.cpp : 콘솔 응용 프로그램에 대한 진입점을 정의합니다.
//
#include "stdafx.h"
/* fold_2.cpp */
#include <vector>
#include <numeric>
#include <functional>
#include <iostream>
using namespace std;
// 함수 처리 흐름을 로깅하기 위한 함수
int addition(const int& x, const int& y)
{
cout << x << " + " << y << endl;
return x + y;
}
int main()
{
c... | ALGO | 0.991531 | 5.858965 |
12f942a4-4439-4d1c-a4a0-2337be6e8590 | alwaysharshtripathi/ACC45DAYSOFCODE-2024 | Day 15.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int t, n, k, m;
cin>>t;
while(t--) {
cin>>n>>k>>m;
if(n % (k * m)) {
cout<<(n / (k * m)) + 1<<endl;
}else {
cout<<n / (k * m)<<endl;
}
}
return 0;
}
| ALGO | 0.999877 | 3.607559 |
f41fc77f-6e62-4445-85fb-bcebc30b00f7 | isFaten5/MyGP | circlight4/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.998821 | 6.785645 |
7abde287-b604-4858-aeea-6f35200f7171 | auronvila/flutter-dice-roller | windows/runner/utils.cpp | #include "utils.h"
#include <flutter_windows.h>
#include <io.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
void CreateAndAttachConsole() {
if (::AllocConsole()) {
FILE *unused;
if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
_dup2(_fileno(stdout), 1);
}
if (freopen_s(&unuse... | TOOL | 0.998733 | 6.76775 |
f7119f4f-e18f-45d8-8213-1e9c5feb3dc3 | rafid211/online-judge-solution | Hackerrank/Minute to Win It.cpp | #include<bits/stdc++.h>
using namespace std;
#define fi first
#define se second
int main()
{
int n,k;
cin >>n>>k;
int a[n],b[n];
for(int i=0;i<n;i++)cin >>a[i];
int c=0;
//vector<pair<char,pair<int,int> > >v;
//vector<int>index;
map<int,int>m;
map<int,int>::iterator it;
for(int i... | ALGO | 0.999749 | 3.154054 |
94e66c14-ad45-4809-9e15-f69c6b7abe54 | ishandutta2007/codeforces | babanin_ivan/normal/4/B.cpp | #include <iostream>
#include <cmath>
#include <string>
#include <vector>
using namespace std;
int a[40];
int minx[40], maxx[40];
int main() {
//freopen("input.txt" ,"r", stdin);
//freopen("output.txt" ,"w", stdout);
int n, x;
scanf("%d %d", &n, &x);
int summin, summax;
summin = summax = 0;
... | ALGO | 0.999994 | 3.051925 |
9b3ffef4-9462-43de-946c-0f908dcce667 | deepak-ky/cpp-codes | cpp-codes/Intermediate_COCOMO_model.cpp | #include<iostream>
#include<math.h>
#include<bits/stdc++.h>
using namespace std;
int fround(float x)
{
return int(x+0.5);
}
int main()
{
float e,t,s,p,eaf,a;
float values[3][4]={3.2,1.05,2.5,0.38,3.0,1.12,2.5,0.35,2.8,1.20,2.5,0.32};
int KLOC,model_no,rating,i,j;
char model_type[][100]={"Organic","Semi-Detached","Embed... | ALGO | 0.998935 | 3.096185 |
bac5d9c8-7f59-49be-b9a4-5fdff56e159b | Andrey-Mol/Informatika-and-Alghoritmy | Old/hash/main.cpp | #include <iostream>
#include <vector>
#include <string>
#include <fstream>
#include <stack>
using namespace std;
string names[5] = { "Андрей", "Тимур", "Петр","Дмитрий", "Евгений" };
string patronymic[5] = { "Андреевич", "Иванович", "Петрович","Иоанович", "Денисcов" };
string surnames[5] = { "Смирнов", "Маслов", "Сафо... | TOOL | 0.904086 | 4.017976 |
03519c7f-f245-412a-a0bd-80c13c5e5425 | Taose/Vegastrike-taose | engine/vs_cubemap_gen/src/filter/filter_impl/filter_one_texel.cpp | #include "../../first.h"
#include "../filter_one_texel.h"
void filter_one_texel::init_constants()
{
cosa_ = ::cosf( max_radius_ );
sina_ = ::sinf( max_radius_ );
}
//very important for this function to be inlined; otherwise the branches are not predictable
inline void clip_to_square( float& x, float& y )
{
... | ALGO | 0.981128 | 5.739621 |
3f1080bd-c695-4109-9438-fab950025ba9 | GabrielEValenzuela/AyED017 | segundo_parcial/tests.cpp | #include <algorithm>
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include "structures.h"
using namespace std;
int main() {
string buffer[] = {"hola", "hola", "test", "hola", "test", "prueba", "ccc", "aaa"};
vector<string> list_of_words(buffer, buffer+8);
cout << "Lista de palabras c... | ALGO | 0.984919 | 4.551222 |
34ed0418-b774-41b5-a559-dd9a1cacec77 | MojoisMojo/DSA | _LeetCode/124.cpp | #include <bits/stdc++.h>
using namespace std;
struct TreeNode {
int val;
TreeNode *left, *right;
TreeNode(int _val = 0, int _idx = -1, int _depth = -1,
TreeNode *_l = nullptr, TreeNode *_r = nullptr) :
val(_val),left(_l), right(_r) {
;
}
};
class Solution {
int maxSum;
publ... | ALGO | 0.999982 | 5.934106 |
a9bddd91-561c-4345-bde1-b6c50fee8cba | ChakradharG/CompetitiveCoding | CodeForces/Harsh/11_236A.cpp | #include <iostream>
#include <string>
#include <set>
using namespace std;
#define Log(x) cout << x << "\n"
void func() {
string name;
cin >> name;
set<char> unique;
for (char c : name) {
unique.insert(c);
}
if (unique.size() % 2) {
Log("IGNORE HIM!");
} else {
Log("CHAT WITH HER!");
}
}
int main... | ALGO | 0.990041 | 3.826717 |
3636c7f2-0ff9-4078-9e97-7ec936140db2 | rikigigi/analisi | eigen3/doc/examples/Tutorial_ArrayClass_interop_matrix.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 * n;
cout << "-- Matrix m*n: --" << endl << result << endl << endl;
result = m.array() * ... | ALGO | 0.998957 | 4.317396 |
b265ece6-85e2-46e9-9f16-24134d9c699e | Manvityagi/Data-Structures-and-Algorithms | DS implementations/STACKS/Stack_linked_list/stack_with_linkedlist.cpp | // IMPLEMENTING STACKS USING LINKED LIST BY TAKING INPUTS FROM THE USER
#include<iostream>
using namespace std;
struct Node
{
int data;
Node *next;
}*top=NULL,*p;
Node* newnode(int x)
{
p=new Node;
p->data=x;
p->next=NULL;
return(p);
}
void push(Node *q) // function to push elements into stack
{
if(top==NUL... | ALGO | 0.989896 | 4.232677 |
6f2b6f61-c5c9-4303-b2fb-aa56dc81c892 | masonarchhsieh/Training_LeetC | next-greater-element-ii/Accepted/12-13-2020, 9_04_45 PM/Solution.cpp | // https://leetcode.com/problems/next-greater-element-ii
class Solution {
public:
vector<int> nextGreaterElements(vector<int>& A) {
int n = A.size();
vector<int> stack, res(n, -1);
for (int i = 0; i < n * 2; ++i) {
while (stack.size() && A[stack.back()] < A[i % n]) {
... | ALGO | 0.999937 | 5.835598 |
759f35cb-99fa-42d6-956f-b9f2bb075f7c | mimingucci/Algorithm | Contest/AtCoder Beginner Contest 380/d.cpp | /*
* author: mimingucci
* created: [Sat] Nov 16, 2024 19:31:05
*/
#include <bits/stdc++.h>
using namespace std;
#define int int64_t
const int INF = int(1) << 62;
const int MAXN = 1e6;
const int MOD = 998244353; // 1e9+7
int32_t main() {
cin.tie(0)->sync_with_stdio(false);
string s;
cin >> s;
int n ... | ALGO | 0.999905 | 5.391843 |
b3872436-75cd-4409-92d1-82e4999d895e | Dr-Lepic/Data-Structure-Lab | Lab Final/Task4.cpp | #include<bits/stdc++.h>
using namespace std;
vector<string> getSubstring(string& line){
vector<string> result;
if(line.length() <= 20){
string temp = line.substr(0, 10);
result.push_back(temp);
return result;
}
int start = 0;
int end = 10;
vector<string> temp;
int c... | ALGO | 0.952269 | 3.393111 |
5eef264c-9b8f-4102-bb4a-a307d0088962 | ishandutta2007/codeforces | daas/normal/643/F.cpp | #include<iostream>
#include<cstdlib>
#include<cstdio>
#include<cmath>
#include<iomanip>
#include<cstring>
#include<algorithm>
#include<ctime>
#include<vector>
#define ll long long
using namespace std;
int read()
{
int kkk=0,x=1;
char c=getchar();
while((c<'0' || c>'9') && c!='-') c=getchar();
if(c=='-') c=getchar()... | ALGO | 0.99996 | 3.297638 |
680557e3-3232-465a-adbc-9c14d5dccf15 | EmmanuelNyameke/repetition | poNegInt.cpp | // Writing a program that asks the user to enter a list of positive or negative integers using the integer 0 as the sentinel. The program then counts the number of positive and negative integers entered
#include <iostream>
using namespace std;
int main(){
// Declaring variables
int integers, count = 0, count1... | ALGO | 0.999746 | 4.141862 |
e931212e-6571-4fdc-a545-fc2e4e4c0d03 | mgh3326/algorithm_inflearn | 30_3의 개수는(large)/30_3의 개수는(large)/Source.cpp | #include<iostream>
#include <string>
using namespace std;
int main(void) {
int num = 0;
scanf("%d", &num);
int count = 0;
for (int i = 0; i < num; i++)
{
string str = to_string(i + 1);
for (int j = 0; j < str.length(); j++)
{
if (str[j] == '3') {
count++;
}
}
}
cout << count << "\n";
return ... | ALGO | 0.99914 | 3.844326 |
105b1993-1789-421a-ae59-ff115b29ba4d | alanfalloon/ipopt-3.3.5 | Ipopt/src/Algorithm/LinearSolvers/IpMa28TDependencyDetector.cpp | #include "IpoptConfig.h"
#include "IpMa28TDependencyDetector.hpp"
/** Prototypes for MA28's Fortran auxilliary function */
extern "C"
{
void
F77_FUNC(ma28part,MA28PART)(ipfint* TASK, ipfint* N, ipfint* M, ipfint* NZ,
double* A, ipfint* IROW, ipfint* ICOL,
... | CONFIG | 0.990591 | 7.044752 |
e5bf9b90-4192-4272-9b71-bef1d32dd89d | Awadesh365/Random_Problem_solving | 747-min-cost-climbing-stairs/min-cost-climbing-stairs.cpp | class Solution
{
public:
int returnMinCost(int idx, vector<int> &cost, int n, vector<int> &dp)
{
if (idx >= n)
return 0;
if (dp[idx] != -1)
return dp[idx];
return dp[idx] = cost[idx] += min(returnMinCost(idx + 1, cost, n, dp), returnMinCost(idx + 2, cost, n, dp)... | ALGO | 0.999974 | 5.814207 |
3421553a-5b02-4648-929d-ff581ca2595d | SrLancelot7/ProgramacionCompetitiva | Algoritmos/grafos/grafosProfe.cpp | #include<vector>
#include<stdio.h>
using namespace std;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
class GrafoAdjList{
public:
int V;
vector<vi> adjList;
GrafoAdjList(int vertices){
V = vertices;
adjList.resize(V);
}
void addEdge(int ... | ALGO | 0.999294 | 3.182177 |
27e32102-422a-443e-9c2a-950d8b56ef7a | 16BitNarwhal/Competitive-Programming | codeforces/757B.cpp | #include <bits/stdc++.h>
using namespace std;
const int MM = 1e5+2;
int spf[MM];
map<int,int> cnt;
void sieve() {
for (int i=2;i<MM;i++) spf[i]=i;
for (int i=2;i<MM;i++) {
if (spf[i]==i) {
for (int j=i*2;j<MM;j+=i)
if (spf[j]==j) spf[j]=i;
}
}
}
int main() {
sieve();
int n;cin>>n;
fo... | ALGO | 0.999945 | 3.881614 |
19fa5d25-6581-44fe-96d2-90f924f55fe7 | harsh6754/DSA-Problems | DSA-Sheet/Striver/Day1_Array/Set_Matrix_Zero/BruteForceApproach.cpp | #include<bits/stdc++.h>
using namespace std;
class Solution{
public:
void setZeroes(vector<vector<int>>& matrix) {
int rows = matrix.size();
int cols = matrix[0].size();
vector<bool> rowFlag(rows, false);
vector<bool> colFlag(cols, false);
// First pass to find which row... | ALGO | 0.998958 | 6.099293 |
8d6993c6-7980-47cf-a05d-c93b1d41281f | dk1242/LeetCode-Practice | 207-course-schedule/207-course-schedule.cpp | class Solution {
public:
// bool checkCycle(int i, int V, vector<int>adj[], vector<int>&vis){
// queue<pair<int, int>>q;
// vis[i]=1;
// q.push({i, -1});
// while(!q.empty()){
// int node=q.front().first;
// int par=q.front().second;
// q.pop();
... | ALGO | 0.999882 | 6.25249 |
700d7793-44b3-48af-8b73-284673cbc32f | IngmarBuchenhain/Mensch-aergere-dich-nicht | Source/Logic/CppClassKI.cpp | #include "CppClassKI.hpp"
KI::KI(int endField, int numberFields)
{
playerEndField = endField;
numberOfFields = numberFields;
}
std::pair<IGamePieceUI_SPTR, std::pair<int, bool>> KI::chooseGamePiece(std::map<IGamePieceUI_SPTR, std::vector<std::pair<int, bool>>> &possiblePieces)
{
// Simple "KI"
// 1. G... | ALGO | 0.980395 | 5.155417 |
0ed58440-2fca-40aa-bbe0-4ce0f183fbe1 | shravan97/algorithms_and_data_structures | competitive/codechef/OCT16/FENWITER.cpp | #include <iostream>
#include <string>
using namespace std;
typedef long long int ll;
int main(int argc, char const *argv[])
{
int t;
cin>>t;
while(t--)
{
string l1,l2,l3;
ll n,r3=0,r2=0,r21=0,r1=0;
cin>>l1>>l2>>l3>>n;
bool n0=0,n2=0;
for(ll i=l3.size()-1;i>=0;i--)
if(l3[i]=='0')
n0=1;
else if(... | ALGO | 0.999657 | 3.638356 |
e6e5e39a-6436-48bc-9b21-ba194c1c1ac4 | yuichiro-kurose/kyopro | joi/joi2025/yosen1-2/c/main.cpp | // author: Yuichiro Kurose
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
string s, t;
cin >> s >> t;
int ao = 0, bitaro = 0;
for (int i = 0; i < n; i++) {
if (s[i] == 'S' && t[i] == 'P') {
ao++;
}
if (s[i] =... | ALGO | 0.999847 | 3.849856 |
6e9585e2-c086-430e-a2b0-5fab14ba62f4 | atulbunkar/leetcode | 152-maximum-product-subarray/152-maximum-product-subarray.cpp | class Solution {
public:
int maxProduct(vector<int>& nums) {
int minpr = 1 , maxpr = 1;
int ans = -1e9;
for(auto &it : nums){
if(it < 0)
swap(minpr,maxpr);
minpr = min(minpr*it,it);
maxpr = max(maxpr*it,it);
ans = max(ans,maxpr... | ALGO | 0.999994 | 5.883714 |
721c0e80-818d-4cf5-a804-d19cdfbce003 | skydev-x/DS-Algo-Competetive-programming | 02-LinkedLists/implement_linkedlist.cpp |
#include <bits/stdc++.h>
using namespace std;
//Node used to make our linked list
class node{
public:
int data;
node* next;
node(int x){
data = x;
next= NULL;
}
};
//Class of our singly linked list with functions
//insertion at head is done in constant time
//insertion at tail will be linear
//deletion is li... | ALGO | 0.999757 | 5.231826 |
ecc40205-285d-42e4-baaa-8b04318ca647 | nicecapj/crossplatfromMmorpgServer | ThirdParty/boost_1_61_0/libs/numeric/odeint/performance/odeint_rk4_array.cpp | #include <iostream>
#include <boost/timer.hpp>
#include <boost/array.hpp>
#include <boost/numeric/odeint/stepper/runge_kutta4_classic.hpp>
#include <boost/numeric/odeint/stepper/runge_kutta4.hpp>
#include <boost/numeric/odeint/algebra/array_algebra.hpp>
#include "lorenz.hpp"
typedef boost::timer timer_type;
typede... | ALGO | 0.998921 | 6.098158 |
ee3c8c0f-090a-4ff8-a071-123bbd1bc4f5 | getoxdev/SDE_Interview_Problems | Day 10-19/Day 11/Q4.cpp | #include<bits/stdc++.h>
#define boost ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long
#define deb(x) cout << #x << "=" << x << endl
using namespace std;
//Search element in a sorted and rotated array
int binarySearch(int ele, int a[],int l, int r)
{
int mid;
while(l<=r)
{
... | ALGO | 0.999973 | 4.698606 |
87fbde89-ae7d-4dae-b130-f491c679b2d0 | JoaoDTorrano/C | Algoritimos II/funcoes recursivas/fibonacci.cpp | #include <iostream>
using namespace std;
int fib(int n)
{
if(n == 0 || n == 1) // condicao de parada
return 1;
else
return fib(n - 1) + fib(n - 2); // chamada recursiva
}
int main()
{
int n;
cin >> n;
// n + 1 chamadas
cout << fib(n) << endl;
return 0;
} | ALGO | 0.999944 | 5.049908 |
1e56fcbe-ae7e-450f-9902-1d3e17a44b5a | kronos/Task-solutions | acm.timus.ru/1000-1100/1100.cpp | #include <iostream>
//#include <cmath>
#include <string>
#include <map>
#include <vector>
using namespace std;
string s;
map<int, vector<int> > t;
map<int, vector<int> >::reverse_iterator it;
int N,i,id,p;
int main()
{
cin >> N;
for(i=0;i<N;i++)
{
cin >> id >> p;
t[p].push_back(id);
}
for(it... | ALGO | 0.999198 | 3.326873 |
06535c02-8114-44aa-9cde-6a21e637497e | abuhanif2020331005/CP | A_Square.cpp | #include<bits/stdc++.h>
using namespace std;
#define int long long
int32_t main()
{
int t;
cin>>t;
while(t--)
{
int a,aa,b,bb,c,cc,d,dd;
int ans=0;
cin>>a>>aa;
cin>>b>>bb;
cin>>c>>cc;
cin>>d>>dd;
if(a==b)
{
ans=(aa-bb)*(aa-bb);
... | ALGO | 0.999451 | 4.282874 |
37bba0ee-b64b-4543-a264-51f28aa57b74 | abhijitjawale09/GFG | Difficulty: Medium/Search Pattern (KMP-Algorithm)/search-pattern-kmpalgorithm.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
vector<int> search(string& pat, string& txt) {
// code here
vector<int>v;
int found=-1;
while((found=txt.find(pat,found+1))!=std::string::npos){v.push_back(f... | ALGO | 0.998367 | 6.332489 |
56d21078-b466-47cb-9cc7-1aadc70af91f | jchengai/gpir | gp_planner/thirdparty/gtsam-4.1rc/gtsam/3rdparty/Eigen/unsupported/doc/examples/PolynomialUtils1.cpp | #include <unsupported/Eigen/Polynomials>
#include <iostream>
using namespace Eigen;
using namespace std;
int main()
{
Vector4d roots = Vector4d::Random();
cout << "Roots: " << roots.transpose() << endl;
Eigen::Matrix<double,5,1> polynomial;
roots_to_monicPolynomial( roots, polynomial );
cout << "Polynomial:... | ALGO | 0.998757 | 4.015535 |
395c956f-31ad-46bf-9cae-bce3ef95859b | Haruuuko/leetcode | C++/400.NthDigit.cpp | /*
Find the nth digit of the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...
Note:
n is positive and will fit within the range of a 32-bit signed integer (n < 231).
Example 1:
Input:
3
Output:
3
Example 2:
Input:
11
Output:
0
Explanation:
The 11th digit of the sequence 1, 2, 3, 4, 5, 6, 7, 8, 9,... | ALGO | 0.999887 | 5.33916 |
4896f8d9-1107-4aa3-8818-0efb07cb8040 | Maciej-6/stoic_app | windows/runner/utils.cpp | #include "utils.h"
#include <flutter_windows.h>
#include <io.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
void CreateAndAttachConsole() {
if (::AllocConsole()) {
FILE *unused;
if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
_dup2(_fileno(stdout), 1);
}
if (freopen_s(&unuse... | TOOL | 0.9988 | 6.76073 |
486cbffd-9de6-460c-b99d-f20d32a08a79 | 135meherab/Data_Structure | Module 14/singly_linked_list_queue.cpp | #include <bits/stdc++.h>
using namespace std;
class Node
{
public:
int value;
Node * next_node;
Node(int value)
{
this->value = value;
this->next_node = NULL;
}
};
class MyQueue
{
public:
Node * head = NULL;
Node * tail = NULL;
... | ALGO | 0.999974 | 4.395355 |
a264ebbf-eb79-4f55-a8f9-48896796a4db | samek567/ZadaniaAlgorytmiczne | Zaprzyjaznij_Sie_Z_Algorytmami/roz10_zbior_pierwszych100pkt.cpp | #include <iostream>
#include <algorithm>
using namespace std;
int z = 0, f = 0, s = 0;
inline bool czy_nalezy(int a, int b)
{
while(__gcd(a,b) != 1)
a /= __gcd(a,b);
if (a == 1)
return true;
else
return false;
}
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
c... | ALGO | 0.999477 | 4.812654 |
ab220645-bc0e-4922-b37e-e1fc69522fea | Mohamed-7018/Interview-Warmup-problem-solving-Sheet | level 2/B. Vanya and Lanterns.cpp | /* Depression i snot a side effect of illness,
it is a side effect of dying */
// author : _Depreesed
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
#ifdef LOCAL
#include "debug.hpp"
#else
#define debug(...) 42
#endif
template<typename T>
using vc = std::vector<T>;
template<typename T>
using ... | ALGO | 0.999938 | 3.384301 |
8f9b17a7-dae6-4972-b888-3ef3855b1c41 | maplelearC/LeetCode | 141. Linked List Cycle/Leetcode141.cpp | //
// Created by 24191 on 2022/7/29.
//
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
struct ListNode
{
int val;
ListNode *next;
ListNode(int x) : val(x), next(nullptr)
{}
};
class Soluti... | ALGO | 0.999828 | 5.531777 |
c1f20922-6bea-4805-aeff-e51cf7533bef | ankuragarwal0408/My-practice | Array/164. Maximum Gap.cpp | class Solution
{
public:
void sort(vector<int>&arr,int n,int exp)
{
queue<int>q[10];
for(int i=0;i<n;i++)
q[(arr[i]/exp)%10].push(arr[i]);
int k=0;
for(int i=0;i<10;i++)
{
while(q[i].empty()==0)
{
arr[k]=q[i].front();
k++;
q[i].pop();
... | ALGO | 0.99993 | 4.869892 |
17e678dd-705c-4f61-ae58-ae057b22b171 | singh651/Coding-Journey | Striver_Arrays/Union using comparison.cpp |
#include <bits/stdc++.h>
using namespace std;
vector < int > FindUnion(int arr1[], int arr2[], int n, int m) {
int i = 0, j = 0; // pointers
vector < int > Union; // Uninon vector
while (i < n && j < m) {
if (arr1[i] <= arr2[j]) // Case 1 and 2
{
if (Union.size() == 0 || Union.back() != arr1[i])... | ALGO | 0.999951 | 4.552694 |
17fdaec7-90dd-424e-89c7-a90abdbb9125 | karouzakisp/llvm-bit-manip | libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.f/eval_param.pass.cpp | // <random>
// template<class RealType = double>
// class fisher_f_distribution
// template<class _URNG> result_type operator()(_URNG& g, const param_type& parm);
#include <random>
#include <cassert>
#include <vector>
#include <algorithm>
#include <cmath>
#include "test_macros.h"
double fac(double x)
{
double ... | TEST | 0.988892 | 4.623489 |
f72ee9d5-6703-4360-bc86-e2472cbd3b36 | AbdulWajid768/Data_Structures | INFINITE_STACK/STACK/Stack.cpp | #include <iostream>
#include "Stack.h"
using namespace std;
template<typename T>
Stack<T>::Stack(int n)
{
if (n > 0)
{
size = n;
}
else
{
size = 10;
}
stack = new T[size];
min = new T[size];
max = new T[size];
sp = -1;
}
template<typename T>
bool Stack<T>::isEmpty()
{
if (sp == -1)
return true;
else... | ALGO | 0.967222 | 4.528451 |
0db2298a-0dc6-4e41-8dbb-4fd1a336d88a | OwaisK4/Competitive-Programming | Codeforces/Wahaj_Retracing/A_King_s_Inspection.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define int long long
#define all(a) a.begin(), a.end()
#define vi vector<int>
#define seed chrono::high_resolution_clock::now().time_since_epoch().count()
#define file_read(filepath) freopen(filepath, "r", stdin);
#d... | ALGO | 0.999978 | 4.939981 |
9c054e98-8bc8-4454-83b1-4805717fe6b8 | harshjasoliya07/skillqode_c_cpp | harsh73.cpp | #include <iostream>
using namespace std;
class loc
{
int longitude, latitude;
public:
loc() {}
loc(int lg, int lt)
{
longitude = lg;
latitude = lt;
}
void show()
{
cout << "\n "
<< longitude << " ";
cout << latitude << "\n";
}
friend lo... | TOOL | 0.918218 | 3.922387 |
3b4351b4-6c3c-4db4-b6fd-77d7b1e26313 | 7ingout/number_quiz | windows/runner/utils.cpp | #include "utils.h"
#include <flutter_windows.h>
#include <io.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
void CreateAndAttachConsole() {
if (::AllocConsole()) {
FILE *unused;
if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
_dup2(_fileno(stdout), 1);
}
if (freopen_s(&unuse... | TOOL | 0.998733 | 6.76775 |
06226087-1811-4997-8156-1976cf7ea3f1 | alighiax/Cpp_Basics_First_Semester | loop.cpp | #include <iostream>
using namespace std;
int main()
{
int i;
for (i = 1; i <= 5; i += 2)
{
cout << i << endl;
}
} | ALGO | 0.981262 | 3.092156 |
28e70ccd-c972-416d-bc9e-1996e483413d | arafinmridul/DSA_reference | sorting_algos/countSort.cpp | #include<iostream>
using namespace std;
#include<algorithm>
void countSort(int a[], int n){
int* s = max_element(a,a+n);
int count[*s+1]={0};
for(int i=0; i<n; i++)
count[a[i]]++;
for(int j=0; j<(*s+1)-1; j++)
count[j+1]+=count[j];
int disp[n];
for(int k=n-1; k>=0; k--)
... | ALGO | 0.999963 | 4.733008 |
ee22835f-b8ce-4381-990d-a3695b44ad11 | sklationd/boj | src/2525/2525.cpp | #include <iostream>
using namespace std;
int main(){
int H,M,D;
cin >> H >> M >> D;
M += D;
H += M / 60;
M %= 60;
H %= 24;
cout << H << " " << M << "\n";
} | ALGO | 0.997005 | 4.652193 |
0beef848-672f-4efc-bca1-c0fc500fdfc2 | duttaANI/AL_Lab | Interview Bit/Dynamic Prog/Merge elements.cpp | // top down
int Solution::solve(vector<int> &A) {
int N = A.size() ;
int t[N][N];
memset( t , 0 , sizeof t);
int p[N+1]; p[0] = 0 ;
for( int i = 0 ; i < N ; i++ )p[i+1] = p[i] + A[i];
for( int L = 2 ; L <= N ; L++ )
for( int i = 0 ; i+L-1<N; i++ )
{
int j = i+L-1... | ALGO | 0.999982 | 4.958963 |
e02fc915-9f23-46c1-9727-8872b4ecabd0 | raincross7/code-similarity | codes/train_code/problem221/problem221_447.cpp | #include <vector>
#include <stack>
#include <queue>
#include <list>
#include <bitset>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <algorithm>
#include <numeric>
#include <iostream>
#include <iomanip>
#include <string>
#include <chrono>
#include <random>
#include <cmath>
#inc... | ALGO | 0.999862 | 3.607409 |
a26789f2-ccdd-4f83-905a-bff6ee8ac69d | shermz-lim/kattis-problems | lyklagangriti.cpp | #include <bits/stdc++.h>
#include <unordered_set>
#include <unordered_map>
using namespace std;
#define ar array
#define ll long long
void solve() {
list<char> lst;
list<char>::iterator cur_ptr=lst.end();
string line;
getline(cin,line);
for(int i=0;i<line.size();i++){
char c=line[i];
... | ALGO | 0.99995 | 4.079424 |
eec269c2-6047-458f-8f3f-5e909b02c934 | fuzzuf/fuzzuf | algorithms/eclipser/core/utils.cpp | /**
* @file utils.cpp
* @author Ricerca Security <<EMAIL>>
*/
#include <fstream>
#include <limits>
#include <chrono>
#if __GNUC__ >= 8
#include <charconv>
#endif
#include <fuzzuf/exceptions.hpp>
#include <fuzzuf/algorithms/eclipser/core/utils.hpp>
namespace fuzzuf::algorithm::eclipser {
namespace {
const auto... | TOOL | 0.955661 | 6.672434 |
95b4f81f-e085-4735-b685-1abbb8adb5fd | ayush9009/daily_coding_work | BSTSeries LargestBSTInBinaryTree.cpp | class Info{
public:
int maxNode;
int minNode;
int maxSize;
Info(int minNode,int maxNode,int maxSize){
this->maxNode=maxNode;
this->minNode=minNode;
this->maxSize=maxSize;
}
};
class Solution{
public:
/*You are required to complete this method */
// Return the ... | ALGO | 0.999903 | 6.576318 |
bfc1c583-b632-403a-9ca6-5d995b8fc65f | hebohang/HEngine | Engine/Source/ThirdParty/glm/test/perf/perf_matrix_div.cpp | #define GLM_FORCE_INLINE
#include <glm/ext/matrix_float4x4.hpp>
#include <glm/ext/matrix_double4x4.hpp>
#include <glm/ext/matrix_transform.hpp>
#include <glm/ext/matrix_relational.hpp>
#include <glm/ext/vector_float4.hpp>
#if GLM_CONFIG_SIMD == GLM_ENABLE
#include <glm/gtc/type_aligned.hpp>
#include <vector>
#include <... | TEST | 0.907131 | 6.623978 |
1392a23b-3512-4d23-86b1-e7525355cc36 | EZ-Robotics/EZ-Template | src/EZ-Template/slew.cpp | #include "EZ-Template/api.hpp"
using namespace ez;
// Constructor
slew::slew() {}
slew::slew(double distance, int minimum_speed) {
constants_set(distance, minimum_speed);
}
// Set constants
void slew::constants_set(double distance, int minimum_speed) {
constants.min_speed = minimum_speed;
constants.distance_to... | ALGO | 0.914714 | 6.00691 |
d76a0ca8-e7a3-4a21-8662-a8c0cc433714 | Kawser-nerd/CLCDSA | Source Codes/CodeJamData/14/53/12.cpp | #include <iostream>
#include <cstdio>
#include <vector>
#include <cstdio>
#include <algorithm>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <bitset>
#include <cmath>
#include <ctime>
#pragma comment (linker, "/STACK:256000000")
using namespace std;
const int maxN = 1100;
const int inf = 1... | ALGO | 0.999841 | 3.425941 |
13aac7e0-3ee9-4d97-a13e-2f5778787fd8 | ansh04196/ReviseWithArsh-6Companies30Days-Challenge | Google/12-sum-of-scores-of-built-strings.cpp | class Solution {
public:
long long sumScores(string s) {
int len = s.size();
vector<int> prefix_lengths(len);
int start = 0, end = 0;
prefix_lengths[0] = len;
for (int current = 1; current < len; ++current) {
if (current <= end) {
prefix_l... | ALGO | 0.999964 | 6.033649 |
823d9244-2109-4904-854f-4bf2418ddc53 | Akriti1811/DSA | Linked List/merge_2_sorted_list.cpp | /*
Merge two sorted linked lists
Medium Accuracy: 49.26% Submissions: 87546 Points: 4
Given two sorted linked lists consisting of N and M nodes respectively. The task is to merge both of the list (in-place) and return head of the merged list.
Example 1:
Input:
N = 4, M = 3
valueN[] = {5,10,15,40}
valueM[] = {2,3,20... | ALGO | 0.999981 | 5.546738 |
01459ac9-5408-4eec-bdd9-7aa00e0bf505 | sandipto729/GLUGNitDgp | p31.cpp | #include<stdio.h>
int main(){
int n,m,i=0,j=0,k=0;
printf("Enter length of array 1 and array 2 : ");
scanf("%d %d",&n,&m);
int A[n],B[m],C[n+m];
printf("Enter element in array 1 : ");
for(int l=0;l<n;l++){
scanf("%d",&A[l]);
}
printf("Eneter element in array 2 : ");
for(int l... | ALGO | 0.999978 | 3.073478 |
75f47bff-fff0-4cfc-810d-2251e6e0975a | arslanehsan/Med-Connect | 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.998764 | 6.762122 |
233fafd4-a9ec-4459-9c91-a099c09f4850 | miguelmc/Online-Judge-Problems | coj/2441.cpp | //2441 - Dots and Squares
#include <iostream>
#include <cstring>
using namespace std;
int main()
{
int t, r, c, lines;
cin >> t;
while(t--)
{
cin >> r >> c;
lines = (r-1)*c + (c-1)*r;
if(lines%2)
cout << "First" << endl;
else
cout << "Second" << ... | ALGO | 0.99961 | 4.34946 |
a2a3a624-b6b7-46a0-87a7-6f09178e6607 | jingfei/CodePractice | contest/ITSA29/pc.cpp | #include <iostream>
#include <cstdio>
using namespace std;
int Month[]={0,31,29,31,30,31,30,31,31,30,31,30,31};
string Da[]={"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"};
bool Leap(int y){
if(y%400==0) return true;
if(y%100==0) return false;
if(y%4==0) return true;
return false;
}
int ... | ALGO | 0.999879 | 3.532289 |
ae24ec50-1cee-4666-8807-6fb9e2d80776 | byzhang/blaze | blazemark/src/boost/SVecTSVecMult.cpp | //=================================================================================================
//=================================================================================================
//*************************************************************************************************
// Includes
//****... | ALGO | 0.998149 | 4.957567 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.