uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
63e7454d-74b8-43f1-8915-961dbf070ef1 | himanshugupta09/Competitive_Programming | CSES-ProblemSet/repetitions.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin>>s;
char curr;
int count = 0,ans=0;
for(int i=0;i<s.length();i++)
{
if(s[i] != curr)
{
curr = s[i];
count =0;
}
if(s[i] == curr)
{
count++;
}
ans = max(count,ans);
}
cout<<ans<<"\n";
return 0;
}
| ALGO | 0.999891 | 3.456814 |
2393f4bf-02d5-4744-a31b-eeec86030950 | PaukIsUha/optimizing_formating_code | predictions/submissions-aizu-cot-gpt35/Codenet/p02404/155322975/response_8.cpp | #include <iostream>
int main() {
int H, W;
while (true) {
std::cin >> H >> W;
if (H == 0 && W == 0)
break;
for (int i = 1; i <= H; ++i) {
for (int j = 1; j <= W; ++j) {
if (i == 1 || i == H || j == 1 || j == W) {
std::cout << "#";
} else {
std::cout << ".... | ALGO | 0.998104 | 4.397535 |
eab4adce-7574-4ba9-87ba-174ebc83fe2c | DanielAugusto191/Competitive_Programming | Solved/C++/B. BerSU Ball.cpp | // https://codeforces.com/contest/489/problem/B
#include <bits/stdc++.h>
using namespace std;
#define _ ios_base::sync_with_stdio(0);cin.tie(0);
#define endl '\n'
#define dbg(a) cout << a << " -- DEBUG -- "<< endl;
#define Adbg(a) for(auto e: a){cout << e << ' ';};cout << endl;
#define all(a) a.begin(),a.end()
#defin... | ALGO | 0.999976 | 3.870982 |
b75a3efd-cd5f-4ceb-8678-fe5987ca1823 | Kuromadoshi/repository | Advent-of-Code/day04/passport1.cpp | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int evaluate (string field)
{
int value = 0;
if (field == "byr") value = 1;
if (field == "iyr") value = 2;
if (field == "eyr") value = 4;
if (field == "hgt") value = 8;
if (field == "hcl") value = 16;
if (field == "ecl") value = 32;... | ALGO | 0.962158 | 4.94317 |
d18a937e-c3f8-430e-b13f-84d18632db67 | udaypardeshi/Data-Structure-All-Codes.cpp | Recursion/Table.cpp | #include <iostream>
using namespace std;
class Table
{
public:
static void table(int x, int i)
{
if(i==11)
{
return;
}
else
{
cout<<x<<" * "<<i<<" = "<<x*i<<endl;
return table(x,i+1);
}
}
};
int main()
{
int x,i=1;
c... | ALGO | 0.99902 | 3.92451 |
2a793926-e3cd-4b59-a0e0-bbfcf724e4e7 | codewitty/CodeLabs | ArraysofObjects.cpp | /* Assume a class Window with a constructor that accepts two integer
arguments: width and height (in that order).
Declare an array named winarr, consisting of 3 Window objects,
where the first element is an 80x20 window, the second a 10x10 window,and the third a 133x40 window.
*/
Window winarr[] {
Window(80, 2... | ALGO | 0.970104 | 4.53888 |
66b484dd-f298-4618-a0ec-9b1ed35fb6f8 | placidz/placidz | Etudes/Master_1/Semestre_2/Visualisation_Scientifique/tp/tp04/tools.cpp | #include "tools.h"
Point2D computeIntersection(Point2D a, Point2D b, Point2D c, Point2D d)
{
int x1 = a.x;
int y1 = a.y;
int x2 = b.x;
int y2 = b.y;
int x3 = c.x;
int y3 = c.y;
int x4 = d.x;
int y4 = d.y;
float supx = (x1*y2-y1*x2)*(x3-x4)-(x1-x2)*(x3*y4-y3*x4);
float sub = (x1-x2)*(y3-y4)-(y1-y2)*(x3-x4);... | ALGO | 0.99888 | 3.612656 |
4311a665-edc3-41ce-b072-d374143516f7 | Tarin10/Data-Structure-Lab | MergeOut.cpp | #include <iostream>
#include<stdlib.h>
using namespace std;
int mcount = 0;
int mscount = 0;
void merge(int *,int, int , int );
void print(int arr[], int l, int h)
{
cout<<"\nArray = [";
for(int i=l; i <h; i++)
cout<<arr[i]<<",";
if(h<l)
cout<<" ]\n";
else
cout<<arr[h]<<"]\n"... | ALGO | 0.999687 | 4.599812 |
ccac6823-6da9-4469-9129-ceeb90d3eb7b | Jihooooooon/coding | Solution1961.cpp | #include <iostream>
using namespace std;
int arr[7][7] = { 0, };
int main(void) {
int T;
cin >> T;
for (int test = 1; test <= T; test++) {
int n = 0;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
cin >> arr[i][j];
}
}
cout << "#" << test << endl;
for (int i = 0; i <n; i... | ALGO | 0.999332 | 3.135169 |
6b891f41-ae8b-4c74-ab69-26f161ab0c3c | seoyeonkk/Algorithm | [BOJ] 2933 ๋ฏธ๋ค๋(๊ตฌํ, ๋์ด๋ ์๐ฅ).cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <cstring>
#define MAX 111
using namespace std;
int R, C;
int N;
char map[MAX][MAX];
int check[MAX][MAX];
vector<pair<int, int>> group;
int dx[] = {0, 0, -1, 1};
int dy[] = {-1, 1, 0, 0};
void dfs(int x, int y) {
if (map[x][y] == '.') return;
... | ALGO | 0.999912 | 3.428019 |
1008a14f-6ae1-4e44-9691-2e9ccd50238f | ishandutta2007/codeforces | peti1234/normal/1195/A.cpp | #include <bits/stdc++.h>
using namespace std;
int n, k, db[1005], cnt;
int main()
{
ios_base::sync_with_stdio(false);
cin >> n >> k;
for (int i=1; i<=n; i++) {
int x;
cin >> x;
db[x]++;
}
for (int i=1; i<=k; i++) {
if (db[i]%2) {
cnt++;
}
}
... | ALGO | 0.999958 | 3.75637 |
e2d048e9-e57d-48b3-9fc1-a55e77635916 | wszhhx/Algorithm-Practice | ็ฎๆณ็ปไน /PATไน็บง-ๆ้ฅผ (25)/B1010.ๆ้ฅผ (25).cpp | #include<iostream>
#include<iomanip>
using namespace std;
//===========================
class MoonCake
{
public:
MoonCake(double m_Ton=0,double m_Sum=0):Ton(m_Ton),Sum(m_Sum)
{
Cost=0;
Remain=0;
Sell=0;
}
void Star()
{
Cost=Sum/Ton;
Remain=Ton;
}
~MoonCake(){}
public:
double Ton;
doub... | ALGO | 0.999933 | 3.555142 |
e6189998-2dae-47c2-89f6-b7eb48733e87 | MohamedKISSI/Code-Paper-A-Pratical-Solver-for-Scalar-Data-Topological-Simplification | ttk-dev/core/base/discreteMorseSandwich/DiscreteMorseSandwich.cpp | #include <DiscreteMorseSandwich.h>
ttk::DiscreteMorseSandwich::DiscreteMorseSandwich() {
this->setDebugMsgPrefix("DiscreteMorseSandwich");
}
void ttk::DiscreteMorseSandwich::tripletsToPersistencePairs(
std::vector<PersistencePair> &pairs,
std::vector<bool> &pairedExtrema,
std::vector<bool> &pairedSaddles,
s... | ALGO | 0.987998 | 6.568428 |
00fc8a4d-c7de-48c7-8e25-7494b39ddd4f | shivam675/surface-detection-ros | godel/godel_process_path_generation/src/polygon_utils.cpp | /*
* polygon_utils.cpp
*
* Created on: May 28, 2014
* Author: ros
*/
#include "godel_process_path_generation/polygon_utils.h"
#include <boost/next_prior.hpp>
#include <boost/foreach.hpp>
#include <Eigen/Geometry>
namespace godel_process_path
{
namespace polygon_utils
{
bool PolygonSegment::intersects(cons... | ALGO | 0.999593 | 7.263621 |
4e2e6e5e-51e5-4143-afe3-756fff292b84 | ishandutta2007/codeforces | s2speed/normal/1416/A.cpp | #include<bits/stdc++.h>
typedef long long ll;
using namespace std;
const ll MAX_N = 3e5;
ll tav(ll n , ll k){
if(k == 0){
return 1;
}
ll x = tav(n , k / 2);
if(k % 2 == 0){
return x * x;
} else {
return x * x * n;
}
}
ll p[MAX_N] , a[MAX_N] , ans[MAX_N];
void solve(){
ll n , x;
cin>>n; x = n;
for(i... | ALGO | 0.999955 | 4.662967 |
dfbd11e2-1bcf-4c99-a8a0-fa78988735a7 | ishandutta2007/codeforces | generic_placeholder_name/normal/1248/B.cpp | #include<bits/stdc++.h>
#define ll long long
using namespace std;
int main(){
int n; cin>>n; int a[n]; for(int i=0; i<n; i++) cin>>a[i];
sort(a, a+n);
ll x=0, y=0;
for(int i=0; i<n/2; i++) x+=a[i];
for(int i=n/2; i<n; i++) y+=a[i];
cout<<x*x+y*y;
} | ALGO | 0.999948 | 4.053892 |
434e79d0-b81b-4d4e-832f-80081d198c9d | adijimmy/CompetitiveProgramming | CODECHEF_ANUBGC.cpp | // https://www.codechef.com/problems/ANUBGC/
// Digit DP :) thanx to problem setter :)
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <cstring>
#include <vector>
#include <string>
#define ll long long int
using namespace std;
int digit;
vector<int> v;
ll dp[18][2][2][2];
ll solve(int pos,int tight,... | ALGO | 0.999579 | 4.706198 |
520260af-1ccf-47d2-8ffe-1d3b428b5a9c | Blizzard/qtbase | src/3rdparty/angle/src/compiler/translator/UnfoldShortCircuitAST.cpp | #include "compiler/translator/UnfoldShortCircuitAST.h"
namespace
{
// "x || y" is equivalent to "x ? true : y".
TIntermSelection *UnfoldOR(TIntermTyped *x, TIntermTyped *y)
{
const TType boolType(EbtBool, EbpUndefined);
TConstantUnion *u = new TConstantUnion;
u->setBConst(true);
TIntermConstantUnion *... | ALGO | 0.995542 | 7.725016 |
e8e132dc-a507-464f-844d-f64b9f85e32f | 113bommy/deepmind_codecontests_refine | cpp_source_filter_file/cpp_train_3055_2.cpp | #include <bits/stdc++.h>
using namespace std;
inline int read() {
int w = 1, s = 0;
char ch = getchar();
while (!isdigit(ch)) {
if (ch == '-') w = -1;
ch = getchar();
}
while (isdigit(ch)) {
s = s * 10 + ch - '0';
ch = getchar();
}
return w * s;
}
struct node {
int to, next;
} e[1010010]... | ALGO | 0.999969 | 4.532344 |
057001ee-cc9c-4be0-bb29-bf59a31e0926 | karandesai24/LeetCode | 476-number-complement/476-number-complement.cpp | class Solution {
public:
int findComplement(int num) {
unsigned int zero_complement = ~0;
while( num & zero_complement ){
zero_complement = zero_complement << 1;
} return num == 0 ? 1 : ~num ^ zero_complement;
}
}; | ALGO | 0.999876 | 5.882862 |
6a497806-eb63-480c-9ebd-1d243ea2bf05 | ishandutta2007/codeforces | shnirelman/normal/1728/B.cpp | #include <bits/stdc++.h>
#define f first
#define s second
using namespace std;
using li = long long;
using ld = long double;
using pii = pair<int, int>;
const int INF = 1e9 + 13;
const li INF64 = 1e18 + 13;
const int M = 998244353;
const int N = 2e5 + 13;
const int A = 26;
const int B = 400;
void solve() {
int ... | ALGO | 0.99996 | 4.556403 |
f03cb187-6c0f-4298-98ec-6b584547492f | IcyLunar/leetcode-75-study | moonpoison/dp_multidemensional/714.cpp | #include<bits/stdc++.h>
using namespace std;
class Solution {
public:
int maxProfit(vector<int>& prices, int fee)
{
int buy=INT_MIN;
int sell= 0;
for(auto price : prices)
{
buy = max(buy,sell-price);
sell = max(sell , buy+price-fee);
}
re... | ALGO | 0.999456 | 5.103682 |
c6999429-a626-4cdd-ab92-8e1604f33037 | Yuvraj2172/myleetcode | 1319-number-of-operations-to-make-network-connected/1319-number-of-operations-to-make-network-connected.cpp | class Solution {
void dfs(vector<int> adj[], vector<bool> &visited, int src)
{
visited[src] = true;
for(int i : adj[src]){
if(!visited[i]){
dfs(adj, visited, i);
}
}
}
public:
int makeConnected(int n, vector<vector<int>>& arr) {
int... | ALGO | 0.999946 | 5.835897 |
14ea75ae-a001-4f10-a72b-1afafc73c6d5 | ZhxCKaMPVfef/hoccppcunghlamm | 10th/maxls.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
ll g[100001],k,limit,d,f[1000001],n,a[1000001],b[1000001],i,j,jmax,pos[1000001];
int main()
{
ios_base::sync_with_stdio();
cin.tie(NULL);
cout.tie(NULL);
freopen("maxls.inp","r",stdin);
freopen("maxls.out","w",stdout);
cin>>n>>k;... | ALGO | 0.999999 | 3.689945 |
f800c932-9a36-426b-a463-0bfe2693624d | bhavyakalra19/cpp_comp_prog_dsa | LevelUp/Arrays & Vectors/nextGreaterElement2.cpp | #include<bits/stdc++.h>
using namespace std;
vector<int> nextGreaterElement(vector<int> v){
int n = v.size();
vector<int> ans(n);
stack<int> st;
for(int i = 2*n - 1; i >= 0; i--){
while(!st.empty() && v[i%n] >= st.top()){
st.pop();
}
if(i < n){
if(st.emp... | ALGO | 0.999941 | 4.436199 |
6f81addc-dafc-43c3-a667-8481946a047e | IvanRojas13/ejemplos-cpp | Ejemp.cpp | #include <iostream>
using namespace std;
class Pareja {
public:
double a, b;
Pareja operator +(const Pareja &p1,const Pareja &p2)
};
Pareja::Pareja(const double a,const double b)
{
this->a = a;
this->b = b;
}
// Sobrecarga del operador +
Pareja& operator +(const Pareja &p1,const Parej... | ALGO | 0.995849 | 4.808945 |
ac6d871a-99a5-4338-bebe-e8102ae40183 | ishandutta2007/codeforces | khuepr123/normal/1725/B.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define endl '\n'
#define fi first
#define se second
#define For(i, l, r) for (auto i = (l); i < (r); i++)
#define ForE(i, l, r) for (auto i = (l); i <= (r); i++)
#def... | ALGO | 0.999966 | 4.881629 |
248e0062-6fd6-4331-84de-fbb031db983d | sarthak2004/Practice-CPlusPlus | primeInRange.cpp | #include<iostream>
using namespace std;
int main() {
int num1, num2, flag = 0;
cin >> num1 >> num2;
for (int i = num1; i <= num2; i++) {
// flag = 0;
int a;
for (a = 2; a < i/2; a++) {
if (i % a == 0) {
// flag = 1;
break;
}
... | ALGO | 0.999843 | 3.576026 |
ae6ad71d-a324-4778-ad1c-0d09f14aa0ae | alexandraback/datacollection | solutions_5630113748090880_0/C++/astrid/B.cpp | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string.h>
#include <strings.h>
#include <string>
#include <algorithm>
#include <vector>
#include <set>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <math.h>
#include <cmath>
#include <map>
#include <list>
#include <queue>
#include <... | ALGO | 0.999886 | 3.848587 |
e3bb6472-3bef-4377-811b-8d59bff3fa51 | raincross7/code-similarity | codes/train_code/problem433/problem433_38.cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
long long ans = 0;
for(int i=1; i<n; i++){
int t = n/i;
if(n%i==0) t--;
// cout << i << ' ' << t << "\n";
ans += t;
}
cout << ans;
} | ALGO | 0.999974 | 4.048412 |
9b296273-4a77-46cf-951d-7fe4b67c5ad6 | GaisaiYuno/OI-Record-exe-deleted | Grade 10-12/codeforces/edu 53 by Dedicatus545 VIRTUAL/D/d.cpp | /*
ๆกช
๎ฃฌะธึฎึฎ
ำฆสฅึฎูฃำดึพำฆษก
ฺดฤฃิธษพาปึฎะฃิธ๏พกาปึฎะก
ฮชึฎ์ฃฌึฐึนึฎษฃึฎุป฿ฃ
*/
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cassert>
#include<cmath>
#include<vector>
#include<queue>
#define ll long long
using namespace std;
inline ll read(){
ll re=0,flag=1;char ch=getchar();
while(!isdigit(ch)){
if(ch=='-') ... | ALGO | 0.99992 | 3.215218 |
52eed037-d36e-42b1-a346-85af14e9160c | Princeofsyntax/leetcode | 496-next-greater-element-i/next-greater-element-i.cpp | class Solution {
public:
vector<int> nextGreaterElement(vector<int>& nums1, vector<int>& nums2) {
unordered_map<int, int> nextGreater;
stack<int> st;
for (int num : nums2) {
while (!st.empty() && st.top() < num) {
nextGreater[st.top()] = num;
st... | ALGO | 0.999755 | 6.163402 |
1f8221bc-fe5e-43b1-8888-0fa981335b48 | paul2705/OI | contact/zhengrui/zhengrui10_noip2019/day2/B_.cpp | #include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<queue>
using namespace std;
typedef pair<int,int> par;
const int MAXN=2e5+5;
int n,tot;
int a[MAXN][2],fa[MAXN][2],d[MAXN][2];
queue<par> q;
bool vis[MAXN][2];
int find(int x,int p){
if (fa[x][p]==x) return x;
int f=find(fa[x][p],p);
... | ALGO | 0.999934 | 3.744548 |
3e1d69f8-80bb-4687-b130-ab17e97808c1 | revng/llvm-project | libcxx/test/std/utilities/function.objects/func.search/func.search.bmh/hash.pass.cpp | // UNSUPPORTED: c++03, c++11, c++14
// <functional>
// boyer_moore_horspool searcher
// template<class RandomAccessIterator1,
// class Hash = hash<typename iterator_traits<RandomAccessIterator1>::value_type>,
// class BinaryPredicate = equal_to<>>
// class boyer_moore_horspool_searcher {
// public:
... | TEST | 0.870174 | 6.533282 |
d90a42e1-a224-4ce3-8bc6-af62124c5019 | Kur0x/GroupSig | GroupSig/Member.cpp | #include "Member.h"
#include <MMX/Cryptography.h>
using namespace group_sig;
member::member(public_para para)
{
this->para = para;
RandomBits(x, para.lambda);
y = PowerMod(para.a, x, para.n);
z = PowerMod(para.g, y, para.n);
}
ZZ member::verify()
{
// TODO network
// send(y, z, SKLOG(x));
if (v == NULL)
thr... | ALGO | 0.993054 | 4.351853 |
89f7638e-9894-4f1c-9fcb-9837f0c35d18 | shahjamanbadhon/Code-Library | Data Structure and Algorithm/GraphTheory/DFS Implementation.cpp | DepthFirstSearch.cpp
#include<bits/stdc++.h>
using namespace std;
// Supposing the maximum nodes that can be present in Graph are 10^5 + 1
vector<int> nodeNeighbour[100002];
bool isVisited[100002];
void depthFirstSearch(int node)
{
isVisited[node] = true;
for(int n: nodeNeighbour[node])
{
if(!isVisited[n])
dep... | ALGO | 0.999649 | 4.855196 |
01f41e99-9515-4dea-aaa0-1eabac69945d | NotDaniHere/nerdarena | schi/schi.cpp | #include <bits/stdc++.h>
using namespace std;
ifstream fin("schi.in");
ofstream fout("schi.out");
int main() {
int a; fin >> a;
vector<int> puncte(a);
unordered_map<int, vector<int>> prikoale;
int maxu = 0;
for(int i = 0; i < a; i++) {
fin >> puncte[i];
maxu = max(maxu, puncte[i])... | ALGO | 0.999849 | 4.098525 |
afb4efa4-85b8-4278-a532-a23ffbfd3137 | aripalanjian/Bin-Packing | palanjiana/brute.cpp | /***************************************************************
Student Name: Ari Palanjian
File Name: brute.cpp
Project 4
Defines the member functions of class Brute
***************************************************************/
#include "brute.hpp"
#include <iostream>
Brute::Brute(double values[],int siz... | ALGO | 0.999811 | 4.772644 |
a3e8730c-c38e-4560-9eec-56ef601e1753 | ICHTHUS-SSU/ichthus_controller | src/vcsd/Ecat_HA.cpp | #include <stdio.h>
#include <string>
#include <map>
#include <iostream>
#include "hybridautomata.h"
HybridAutomata *ecat_HA;
extern int ecatUp(); //from ecat.c
extern int ecatOn();
extern int ecatOff();
extern int ecatDown();
extern int get_rtParam_int(char *name, char *field); //from GlobalParam.cpp
enum
{
START... | TOOL | 0.916412 | 4.224194 |
a6c018c5-f308-4983-9646-4a47d9143ade | roxdan/Pacman_OpenGL | Package4/code/main.cpp | /*
Maze Algorithm - Pacman game in OpenGL
Recursive backtracking in C++
Danillo Lange
UDL - MINF 20-21
Computer Graphics and Multimedia
main.cpp
*/
// g++ -o pacman main.cpp Maze.cpp Pacman.cpp Ghost.cpp Sphere.cpp-lGL -lglut -lGLU
#include "Maze.cpp"
#include "Pacman.cpp"
#include "Ghost.cpp"
#include "Sphere.cpp"
#... | ALGO | 0.997472 | 3.659178 |
7c284d6b-c9ef-4af3-827f-0fe7dff20ac5 | JanLeoEgamen/C-2nd-Semester-Code-deliverables-and-practices-compilatioin | cc2.cpp | #include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main(){
float height, distance, c = 0, ratio=0, power=1;
cin>>height>>distance;
c = sqrt(pow(height, 2) + pow(distance, 2));
cout << fixed << setprecision(2) << c << endl; // limit output to 4 bytes
if(power<=ratio)... | ALGO | 0.999738 | 4.032259 |
9d8708b6-e493-4605-acbe-4fea178782bf | sinsinkun/raylib-hex-game | util.cpp | #include "raylib.h"
#include "raymath.h"
#include "math.h"
#include "util.h"
Vector2 Util::rotate2d(Vector2 c, Vector2 p, float r) {
float dx = p.x - c.x;
float dy = p.y - c.y;
Vector2 o = { c.x + (dx * cos(r) - dy * sin(r)), c.y + (dy * cos(r) + dx * sin(r))};
return o;
}
Vector2 Util::rotate2d(Vector2 p, fl... | TOOL | 0.94331 | 6.027807 |
eda92357-d4ec-4141-b1e1-05c683499cd5 | vyosypenko/MES_Final_Project | STM32_CamMNIST/Middlewares/Third_Party/EdgeImpulse_ml_mnist_MachineLearning/edgeimpulse/edge-impulse-sdk/tensorflow/lite/micro/kernels/squared_difference.cpp | #include "edge-impulse-sdk/tensorflow/lite/c/common.h"
#include "edge-impulse-sdk/tensorflow/lite/kernels/internal/quantization_util.h"
#include "edge-impulse-sdk/tensorflow/lite/kernels/internal/reference/binary_function.h"
#include "edge-impulse-sdk/tensorflow/lite/kernels/internal/reference/integer_ops/add.h"
#inclu... | ALGO | 0.949529 | 7.640289 |
bc8e05e5-be6e-47a9-bcb8-55b998ded826 | quanghm/UVA-online-judge | 440.cpp | /*
* =====================================================================================
*
* Filename: 440.cpp
*
* Description: Eeny Meeny Moo
*
* Version: 1.0
* Created: 09/02/2016 15:09:12
* Revision: none
* Compiler: gcc
*
* Author: Quang Hoang (QH), <E... | ALGO | 0.999729 | 4.08952 |
4c83ef4c-0bf7-4efd-96f7-40af40e72057 | Koyingtw/CP | TIOJ/1289.cpp | #pragma region
#include <bits/stdc++.h>
#define Koying ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define int long long
#define pr pair<int, int>
#define F first
#define S second
#define max(a, b) (a > b ? a : b)
#define min(a, b) (a < b ? a : b)
#define DB(a) cout << a << endl;
#define stop system("pause");
#de... | ALGO | 0.9991 | 3.873626 |
4684b220-2352-456f-91c0-9b51f4767d80 | alexandraback/datacollection | solutions_1673486_1/C++/wujianan2007/main.cpp | #include <iostream>
#include <cstdio>
using namespace std;
#define MAXN 100005
int t;
int a, b;
double p[MAXN];
int main() {
freopen("A-large.in", "r", stdin);
freopen("A-large.out", "w", stdout);
cin >> t;
for (int cas = 1; cas <= t; cas++) {
cin >> a >> b;
p[0] = 1;
for (int i... | ALGO | 0.997388 | 3.187973 |
ef2f03d8-7062-4b07-b364-3e5289d50d5e | yoshihiromaed/FastImplementation-BilateralFilter | FastImplementation-BilateralFilter/bilateralNonLocalMeansFilter_Scalar.cpp | #include "color.h"
#include "filter.h"
using namespace std;
using namespace cv;
class BilateralNonlocalMeansFilterInvorker_64f : public cv::ParallelLoopBody
{
private:
const Mat * src;
Mat* dest;
const int* template_ofs;
const int template_maxk;
const int* search_ofs;
const int search_maxk;
const int templateW... | ALGO | 0.99705 | 3.855664 |
492ee74a-d779-465e-89d6-1c741fa551a3 | ashish22csu035/C | program_to_check_if_an_alphabet_is_a_vowel_or_consonent.cpp | #include <stdio.h>
int main() {
char c;
int lowercase_vowel, uppercase_vowel;
printf("Enter an alphabet: ");
scanf("%c", &c);
lowercase_vowel = (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u');
uppercase_vowel = (c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U');
if (lowerc... | ALGO | 0.997345 | 4.910231 |
a48d08a1-a5a0-4cb2-831e-d2a3033c37f8 | thinking-bzf/Cpp-coding | ACM2/FinalTest/3.cpp | #include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
int main()
{
int c, n, m, i, j, a[1005];
char s[1000];
cin >> c;
while (c--)
{
cin >> s;
m = 0;
for (i = 0; i < strlen(s); i++)
{
if (s[i] >= '0' && s[i] <= '9')
m = m * 10 + s[i] - '0';
}
m = m * 513;
cout << m;
... | ALGO | 0.999066 | 3.63928 |
101e5ab1-de8f-4ad1-a25a-96206234a9f3 | maet98/competitive_programming | codeforces/642/c.cpp | #include<bits/stdc++.h>
using namespace std;
int main(){
int n = 500000;
vector<long long>a(n);
a[0] = 0;
for(long long i = 1;i < n;i++){
a[i] = 8LL*i*i+a[i-1];
}
int t;
cin >> t;
while(t--){
int n;
cin >>n;
cout << a[n/2] << endl;
}
}
| ALGO | 0.999768 | 4.19025 |
b5173c28-2144-454a-aaec-daa4c35b527b | Noodle96/contestProgramming | CDFC/1300/buyingShowels.cpp | #include <bits/stdc++.h>
#define all(x) x.begin(),x.end()
#define msg(str,str2) cout << str << str2<< endl
using namespace std;
using ll = long long;
using ld = long double;
using uint = unsigned int;
using ull = unsigned long long;
template<typename T>
using pair2 = pair<T, T>;
using pii = pair<int, int>;
using pli =... | ALGO | 0.999833 | 4.553146 |
cd7fe17a-a374-4dab-9c15-ea7de90d4acd | manshagroup456/Programing-fundamental | programs/Source77.cpp | #include<iostream>
#include<conio.h>
#include<math.h>
using namespace std;
int main()
{
int i, j, add;
int num;
cout << "Enter a number that you want to match with array :";
cin >> num;
int arry[10];
for (i = 1;i <= 10;i++)
{
cout << "Enter a value of array index { " << i << " }";
cin >> arry[i];
cout << ... | ALGO | 0.955077 | 3.118616 |
dd056431-38ed-4def-8936-b9c66d10d974 | Rikon07/Codeforces-Rik_on | B_Good_Arrays.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
string solve(int n)
{
vector<int>arr(n), b(n);
ll sumA = 0, sumB = 0;
for(int i=0; i<n; i++)
{
cin >> arr[i];
sumA += arr[i];
if(arr[i] == 1){
b[i] = 2;
}
else{
b[i] = 1... | ALGO | 0.999465 | 4.455912 |
0bf75c7e-c8de-40f0-8f0d-adc16a74fa98 | 113bommy/deepmind_codecontests_refine | cpp_source_filter_file/cpp_train_2566_121.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int x;
cin >> x;
cout << 1;
}
| ALGO | 0.999562 | 3.25921 |
f0e89912-8571-450c-873b-96151f9cacf2 | artem-barsov/CP | opencup/XXII/Poland/N.cpp | #include <bits/stdc++.h>
#define endl '\n'
#define int long long
using namespace std;
int asum(int a, int n) {
return n * (2 * a + n - 1) / 2;
}
void prnt(int sum, int a, int n) {
cout << sum << " = " << a;
for (int i = 1; i < n; i++) {
cout << " + " << a + i;
}
cout << endl;
}
void solv... | ALGO | 0.999611 | 4.648382 |
425ea02a-442e-4caf-849f-bd0834da9eb1 | JHU-DBF/ardupilot | libraries/Filter/SlewCalculator2D.cpp | /*
The SlewCalculator2D filter calculates a slew rate useful for detecting
oscillations in a 2-axis PID controller.
*/
#include "SlewCalculator2D.h"
SlewCalculator2D::SlewCalculator2D() :
xlimiter(slew_rate_max, slew_rate_tau),
ylimiter(slew_rate_max, slew_rate_tau)
{
}
// apply filter to sample and calc... | TOOL | 0.963304 | 6.608823 |
89e77c6d-949a-4fe4-a108-51e507f9dfd3 | ramosjuanr/frameworks_av | media/module/codecs/amrnb/enc/src/ol_ltp.cpp | /*
------------------------------------------------------------------------------
Pathname: ./audio/gsm-amr/c/src/ol_ltp.c
Funtions: ol_ltp
Date: 04/18/2000
------------------------------------------------------------------------------
REVISION HISTORY
Description: Adding pOverflow to the functions to remo... | ALGO | 0.956116 | 7.337349 |
b89185f5-ca25-4cc9-a023-412bcaa51918 | J-c0d3r/IAlgoritmos-3 | Laboratรณrio/Trab/Projeto_1_C204.cpp | #include <iostream>
#include <cmath>
#include <iomanip>
#include <climits>
#include <algorithm>
using namespace std;
// Funcao calcula distancia entre dois pontos, solicitando o ponto inicial e final de x e y
float dist(float x1, float x0, float y1, float y0)
{
float distancia;
distancia = sqrt(((x1 - x0) * (x1 - x... | ALGO | 0.999978 | 4.608834 |
e70333cc-03e9-4e96-bf59-6826eb356253 | ronghanghu/speaker_follower | src/driver/mattersim_main.cpp | #include <iostream>
#include <opencv2/opencv.hpp>
#include "MatterSim.hpp"
using namespace mattersim;
#define WIDTH 1280
#define HEIGHT 720
#ifndef M_PI
#define M_PI (3.14159265358979323846)
#endif
int main(int argc, char *argv[]) {
cv::namedWindow("displaywin");
Simulator *sim = new Simulator();
//... | ALGO | 0.896705 | 5.099195 |
66f852bc-b3b4-4fa0-9ac0-43b465f5d972 | JoffreyB31/ApsioCoin | src/rpc/client.cpp | #include <rpc/client.h>
#include <rpc/protocol.h>
#include <util.h>
#include <set>
#include <stdint.h>
class CRPCConvertParam
{
public:
std::string methodName; //!< method whose params want conversion
int paramIdx; //!< 0-based idx of param to convert
std::string paramName; //!< parameter name
... | CONFIG | 0.945204 | 7.307106 |
1be6cd26-b074-47a4-b173-5650b33d3b75 | Arj404/CP_practise | angle_b:w_clock_hands.cpp | #include<iostream>
using namespace std;
float minu(float a, float b){
if(a>b){
return b;
}
else{
return a;
}
}
float angle(int h,int m){
if(h<0 || m<0 || h>12 || m>60){
return -1;
}
if(h == 12){
h = 0;
}
if(m == 60){
m=0;
h++;
... | ALGO | 0.999884 | 4.110812 |
13a23679-09a0-4330-abf0-390210e2e524 | duckladydinh/randoms | cpalgorithms/persistent_treap.cpp | #include "init.h"
// Time Complexity: Avg. O(logN)
// Non-persistent Treap is 50% faster
// All queries can be put in update()
// AVOID TOO MANY calls to merge, split
namespace Treap {
struct Treap {
llint x;
int y, s = 1;
Treap *l = nullptr, *r = nullptr;
explicit Treap(llint _x) ... | ALGO | 0.999598 | 4.83214 |
92c5f99c-1e85-41f4-9c1e-7c03126cf08e | clausenar/C-primer-5ed-solutions | chapter_04/e04_32.cpp | #include<iostream>
#include<vector>
#include<cstring>
using namespace std;
int main()
{
constexpr int size=5;
int ia[size]={1,2,3,4,5};
for (int *ptr =ia,ix=0;ix!=size && ptr !=ia+size;++ix,++ptr)
cout << ix << " " << *ptr << "\n";
}
| ALGO | 0.997393 | 3.429889 |
8f6208d7-e01e-4f7e-903c-3dfdb0e61c72 | ssr2112/LeetCoder | Stock buy and sell II - GFG/stock-buy-and-sell-ii.cpp | //{ Driver Code Starts
#include<bits/stdc++.h>
using namespace std;
class Array
{
public:
template <class T>
static void input(vector<T> &A,int n)
{
for (int i = 0; i < n; i++)
{
scanf("%d ",&A[i]);
}
}
template <class T>
static void print(vector<T> &A)
... | ALGO | 0.998688 | 6.389289 |
96595148-0d52-41b0-bc82-7f7a24f49180 | nathan-lai-engineering/cecs-282-lab | Lab1/Lab1.1.cpp | /**
CECS 282 LAB 1, Problem 1: Sums the odd digits in a given string
@file Lab1.1.cpp
@author Nathan Lai
@version 5.11 8/27/20
*/
#include <iostream>
#include <string>
using namespace std;
int main()
{
cout << "Input string: ";
int inputnum;
cin >> inputnum;
int su... | ALGO | 0.999748 | 5.046837 |
a7bbfaff-29d2-493f-b4d5-c4273734f0b1 | JosepHyv/Contest-Archive | atcoder/begginer/Longest-Segment/Longest-Segment.cpp | // template c++ example by Joseph Hynimoto Aguilar Lopez
#include<bits/stdc++.h>
#define debug(x) cerr<<#x<<" = "<<x<<"\n"
using namespace std;
typedef long long int ll;
constexpr int MAXN = 1e6+2;
constexpr int inf = 2e9;
///your variables are here
int main()
{
ios::sync_with_stdio(false);
cin.tie(NULL);
cout<<s... | ALGO | 0.999006 | 3.249067 |
a77e7375-becb-4405-9740-a01a67b496ac | Wardell-Jarvis007/Lab2-number-plate-challenge | cpp/filter2d.cpp | // header inclusion
#include <stdio.h>
#include <opencv/cv.h> //you may need to
#include <opencv/highgui.h> //adjust import locations
#include <opencv/cxcore.h> //depending on your machine setup
using namespace cv;
void GaussianBlur(
cv::Mat &input,
int size,
cv::Mat &blurredOutput);
int main( int ar... | ALGO | 0.880411 | 5.205091 |
a7c0e784-da7f-4852-b097-564dd628f1ef | ChitrakshGupta/LeetCode_Questions | 2053-kth-distinct-string-in-an-array/2053-kth-distinct-string-in-an-array.cpp | class Solution {
public:
string kthDistinct(vector<string>& arr, int k) {
unordered_map<string, int> mp;
for(string& str:arr){
mp[str]++;
}
for(string& s:arr){
if(mp[s]==1){
k--;
}
if(k==0){
ret... | ALGO | 0.999956 | 5.918998 |
6ec73852-0735-42e3-9ac9-7be836009859 | pavel-ryzhov/global_vars | runs/001937.cpp | //e-maxx ru/algo/lca_linear
#include <iostream>
#include <vector>
#include <string.h>
using namespace std;
typedef vector< pair <int,long long int> >::const_iterator const_graph_iter;
const int MAXN = 100*1000;
const int MAXLIST = MAXN * 2;
const int LOG_MAXLIST = 18;
const int SQRT_MAXLIST = 447;
const int MAXBLOC... | ALGO | 0.999942 | 4.651199 |
813b3fc0-6143-4035-81cf-a11cb078e54c | wiraphatys/COMP_PROG_2110104 | Grader/solution/03_Loop_16.cpp | #include <iostream>
using namespace std;
int main()
{
int num, left, right, base;
cin >> num;
left = num;
right = num;
base = 2 * num - 1;
for (int i = num; i < base; i++)
{
string j(i, '.');
j[left - 1] = '*';
j[right - 1] = '*';
left--;
right++;
... | ALGO | 0.999858 | 3.121204 |
22084248-9eb6-4102-ad60-7d1f979c1369 | CmdrMoozy/paper | src/PaperCommon/Compression/LZMA.cpp | #include "LZMA.h"
#include <lzma.h>
#include <climits>
#include <cstdio>
#include <cstring>
#include <stdexcept>
#include <string>
#include "PaperCommon/Util/Memory.h"
#include "PaperCommon/Util/Memstream.h"
namespace
{
constexpr uint64_t BUFFER_SIZE = 8192;
/**
* This is a small utility function which converts a... | TOOL | 0.958046 | 7.830845 |
f18b9a31-6e22-4faa-b116-a780407dae2d | san-gg/Striver-Sheet-Challenge | NumberOfDistinctString.cpp | class Trie {
vector<Trie*> next;
public:
Trie() : next(26, 0) { }
Trie* contains(char ch) {
return next[ch - 'a'];
}
Trie* insert(int ch, Trie *t) {
next[ch - 'a'] = t;
return t;
}
};
int getLength(Trie *root, string &word, int pos) {
Trie *node = root;
int ... | ALGO | 0.999932 | 5.259698 |
2e284848-3abd-4e9b-bfb6-8279835984ed | Prateek-2441/FOCP_II-LAB-MANUAL | lab-3 1.cpp | #include <iostream>
using namespace std;
int maxNumber(int a, int b) {
if (a > b) {
return a;
}
else {
return b;
}
}
int main() {
int num1, num2;
cout << "Enter the first number: ";
cin >> num1;
cout << "Enter the second number: ";
cin >> num2;
int max = ma... | ALGO | 0.998971 | 5.39513 |
c36695b8-39ec-4c44-96f4-46d4fa0911a9 | ishandutta2007/codeforces | yosupo/normal/526/B.cpp | #include <bits/stdc++.h>
using namespace std;
typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;
ll d[100100];
int main() {
int n;
cin >> n;
for (int i = 2; i < (1<<(n+1)); i++) {
cin >> d[i];
}
ll res = 0;
for (int i = (1<<n)-1; i >= 1; i--) {
re... | ALGO | 0.99956 | 4.114245 |
bffe5323-7bdd-4aad-86ad-e871b0e84b77 | coderrrx-Brijesh/CPP | set/unordered_set_impl.cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
// unordered_set <int> s;
unordered_multiset <int> s;
s.insert(1);
s.insert(2);
s.insert(2);
s.insert(3);
s.insert(4);
s.insert(5);
s.insert(-1);
s.insert(10);
s.insert(5);
for(auto i:s) cout<<i<<" ";
return 0;
} | ALGO | 0.980037 | 3.463391 |
828c2c15-598e-43f8-b073-a3d6bc2fafaa | davidasousa/CS525 | hw4/question2/main_1.cpp | #include <iostream>
#include <unistd.h>
#include <vector>
#include <algorithm>
#include <random>
#include "pthread.h"
#include "sys/time.h"
// Defining Structures & BST Functions
typedef struct node {
int val;
node* left;
node* right;
pthread_mutex_t* node_mutex;
pthread_mutex_t* parent_mutex;
} node;
typedef st... | ALGO | 0.99977 | 4.728152 |
4a46e527-91a8-4a3f-a2f4-63128a39a2aa | jdumont0201/PathPlanning | main.cpp | /** C++ Path optimization
* Tests various algorithms against the problem of
* finding a path between an initial state and a goal state
* @author JDumont
* */
#include "core/PathPlanning.h"
#include "visualization/DataBinder.h"
#include "visualization/Window.h"
#include "visualization/VisualizationLauncher.h"
int ... | ALGO | 0.997594 | 3.609224 |
b3e98578-0a8a-4e70-b983-ea8e920f1a5e | bolucat/Firefox | intl/icu/source/common/ubidiwrt.cpp | #include "unicode/utypes.h"
#include "unicode/ustring.h"
#include "unicode/uchar.h"
#include "unicode/ubidi.h"
#include "unicode/utf16.h"
#include "cmemory.h"
#include "ustr_imp.h"
#include "ubidiimp.h"
/*
* The function implementations in this file are designed
* for UTF-16 and UTF-32, not for UTF-8.
*
* Assumpti... | ALGO | 0.998334 | 7.19167 |
ff1a400a-7e4d-44d8-a2d9-06948c94dc00 | sendoru/ps-cpp-new | source/boj/32123.cpp | // #include "atcoder/all"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const ll MOD9 = 998244353;
const ll MOD1 = (ll)1e9 + 7;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(null... | ALGO | 0.999985 | 4.653687 |
1ab65ef8-b392-4e9f-b8a2-3f8273a9098e | thegamer1907/Code_Analysis | contest/1542535400.cpp | #include <bits/stdc++.h>
using namespace std;
#define INF 0x3f3f3f3f
#define max(a,b) ((a) > (b) ? (a) : (b))
#define min(a,b) ((a) < (b) ? (a) : (b))
#define MAX 1000100
#define mp make_pair
#define pb push_back
#define fori(n) for(int i = 0; i < n; i++)
#define forsi(s, n) for(int i = s; i < n; i++)
#define... | ALGO | 0.999944 | 3.929361 |
cedf3ce6-6eac-4037-9cca-6f6b089adcc7 | Dorisgua/CS101-Algorithms-and-Data-Structures | HW_coding/tmp/pa3/2/1.cpp | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
void read(long long &x)
{
auto c=getchar();x=0;
for(;!isdigit(c);c=getchar());
for(;isdigit(c);x=(x<<1)+(x<<3)+(c^'0'),c=getchar());
//printf("%d",x);
}
//long long maxn = 1223372036;
long long fa[1000000], height[1000000],... | ALGO | 0.999881 | 3.961187 |
cc0e49a2-c08d-4d6b-a90d-cb2e589b3c54 | koralkulacoglu/CompetitiveProgramming | CodeForces/Contests/Pinely/1/E.cpp | /*
ID: Koral Kulacoglu
TASK: test
LANG: C++
*/
#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef long double lld;
typedef complex<ld> cd;
typedef pair<int, ... | ALGO | 0.999941 | 4.285222 |
5fc5b4b5-9237-4bfb-9d24-984646c8497a | abdelaleem024/competitive-programming | Solutions/Codeforces Gym Solutions/(Aleppo + HAIST + SVU + Private) CPC 2022/K. Movie Planning.cpp | /*
Author : Abdelaleem Ahmed
Codeforces Handle : [Abdelaleem](https://codeforces.com/profile/Abdelaleem)
Link To problem : https://codeforces.com/gym/103821/problem/K
*/
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define int long long
const int mod = 1000000007;
int add(int x, int ... | ALGO | 0.99997 | 5.138967 |
2acfeec4-d265-4069-8bca-5753df5b1ad2 | zanj0/CP-Templates | Treap.cpp | const int N = 1e5 + 5;
class Treap {
public:
int data, priority;
Treap* kids[2];
int subtreeSize, sum, toProp;
Treap(int data) {
this->data = data;
priority = rand() % N;
recalc(this);
}
vector <Treap*> split(Treap* node, int nInLeft) {
}
};
int main() {
return 0;
} | ALGO | 0.998663 | 4.305754 |
cc67d682-68ae-4ab0-8b26-3cbf11776b49 | fwdzh/cp_code | Luogu/P3572/main.cpp | // #define YUANSHEN
#if defined(YUANSHEN)
#include "C:/codes/cp_code/template/debug.hpp"
#else
#include <bits/stdc++.h>
using namespace std;
#define dbg(...) 42
#endif
#define rep(N) for(int i = 1; i <= N; i++)
template <typename T1, typename T2>
void cmin(T1& x, const T2& y)
{
x = x < y ? x : y;
}
template <type... | ALGO | 0.999979 | 4.900599 |
8c49418a-57b3-423b-82e5-a39a371bd8c5 | MySummertime/leetcode | 2319.Check if Matrix is X-Matrix.cpp | #include <vector>
using std::vector;
class Solution {
public:
// math
bool checkXMatrix(vector<vector<int>>& grid) {
for (int i = 0, len = grid.size(); i < len; ++i) {
for (int j = 0; j < len; ++j) {
if (i == j || i + j + 1 == len) {
if (grid[i][j] == 0)... | ALGO | 0.999684 | 5.542162 |
62ca302c-49c5-4bfd-bcfb-76502db321ee | MisaghTavanpour/cppPrimer5thEdition | 12-24.cpp | #include <iostream>
#include <string>
using namespace std;
int main() {
string s1;
cin >> s1;
unsigned int size = s1.size();
char *ch = new char[size];
for (int i = 0; i < size; ++i) {
ch[i] = s1[i];
}
for (int i = 0; i < size; ++i) {
cout << ch[i];
}
co... | ALGO | 0.966609 | 3.993227 |
32b56b5f-1cdf-47cc-9670-1fc7520ae508 | Johyeonwoooooooo/Algorithm | BeakJoon/03 ๋ฐ๋ณต๋ฌธ/3-09,10.cpp | #include<iostream>
using namespace std;
int main()
{
int n;
while (true)
{
cin >> n;
if (1 <= n && n <= 100)
break;
}
for (int i = 0; i < n; i++)
{
for (int k = 1; k < n - i; k++)
cout << " ";
for (int j = 0; j <= i; j++)
cout << "*";
cout << "\n";
}
return 0;
} | ALGO | 0.999386 | 3.51279 |
1f323076-08fe-4935-b152-a6500b9e62b0 | ujjawalpatidar025/Striver-DSA-Series | Binary Search/Capacity to ship packages within d days.cpp | class Solution {
public:
bool possible(vector<int> wts, int mid, int days) {
int d = 1, sum = 0;
for(int i = 0; i < wts.size(); i++) {
sum += wts[i];
if(sum > mid) {
d++;
sum = wts[i];
}
}
return d <= days;
}... | ALGO | 0.999984 | 5.848226 |
1ff7ba7f-bf7f-4baf-88b0-691194a90199 | zhipeng-web/my_algorithm | ๆปๅจ็ชๅฃ/3.cpp | //
// Created by china on 2023/12/25.
//
#include "iostream"
#include "unordered_set"
#include "string"
using namespace std;
class Solution {
public:
int lengthOfLongestSubstring(string s) {
int n = s.length();
if(n==0){
return 0;
}
int ans = -1;
int left = 0,righ... | ALGO | 0.999889 | 6.15679 |
7dd0d672-10ec-451a-9476-cab1a67f8be7 | ishandutta2007/codeforces | vepifanov/normal/203/A.cpp | #include <cstdio>
#include <numeric>
#include <iostream>
#include <vector>
#include <set>
#include <cstring>
#include <string>
#include <map>
#include <cmath>
#include <ctime>
#include <algorithm>
#include <bitset>
#include <queue>
#include <sstream>
#include <deque>
using namespace std;
#define mp make_pair
#define ... | ALGO | 0.999773 | 3.448388 |
4fda3396-ac13-443e-9295-3b0af063ef8a | tin10401/CodeForces | CodeForces/1155D_Beautiful_Array.cpp | //โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
//โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
//โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
//โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
//โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
//โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
// __________________
// | ________________ |
// || ____ ||
// ||... | ALGO | 0.99898 | 4.383713 |
7627683b-514d-46a6-b95e-26311dba85ee | Shahid-Yaseen/Data-Structure-and-Algorithm-in-Cpp-C-Plus-Plus- | DoublyLinkedList/main.cpp | #include"myLinkedList.h"
int main()
{
//Creating the empty LinkedList
myLinkedList mll;
//Checking insertAtTail function
mll.insertAtTail(12);
mll.insertAtTail(13);
mll.insertAtTail(14);
//Checking insertAtHead function
mll.insertAtHead(10);
//Checking display function
mll.display();
//... | ALGO | 0.99658 | 3.026854 |
f391a821-0117-4c46-b269-d4352953d5fe | Gj0705/RELOCALIZATION | ็ฌฌไธ็ซ ๆฆ่ฟฐ/lidar_localization/third_part/gtsam-4.0.2/timing/timeFactorOverhead.cpp | /**
* @file timeFactorOverhead.cpp
* @brief Compares times of solving large single-factor graphs with their multi-factor equivalents.
* @author Richard Roberts
* @date Aug 20, 2010
*/
#include <gtsam/base/timing.h>
#include <gtsam/linear/GaussianBayesNet.h>
#include <gtsam/linear/GaussianFactorGraph.h>
#... | TEST | 0.96529 | 6.790347 |
68fc94ee-181e-4a47-ac59-9127363399e3 | exapde/Exasim | kokkos/algorithms/unit_tests/TestStdAlgorithmsTeamReverseCopy.cpp | #include <TestStdAlgorithmsCommon.hpp>
namespace Test {
namespace stdalgos {
namespace TeamReverseCopy {
namespace KE = Kokkos::Experimental;
template <class SourceViewType, class DestViewType, class DistancesViewType,
class IntraTeamSentinelView>
struct TestFunctorA {
SourceViewType m_sourceView;
Dest... | TEST | 0.982081 | 6.250912 |
5c6e7b8d-bb85-4c4b-a8d9-8e0ff902939e | jungh150/PS | baekjoon/26766.cpp | #include <iostream>
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n;
cin >> n;
while (n--) {
cout << " @@@ @@@ \n@ @ @ @\n@ @ @\n@ @\n @ @ \n @ @ \n @ @ \n @ @ \n @ \n";
}
} | ALGO | 0.9998 | 3.952031 |
50f0774d-42ea-4313-974e-60acd485520f | Ca3zsar/Code-Problems | pbinfo/3291.cpp | #include <iostream>
using namespace std;
const int N = 30000000;
int v[N/32+1];
int main()
{
int x;
while(cin>>x && x!=0)
{
if(v[x/32] & (1<<(x%32)))
{
printf("%d",x);
return 0;
}
else v[x/32] |= (1<<(x%32));
}
return 0;
}
| ALGO | 0.999712 | 3.222842 |
3a6ac43c-3757-4f57-8db7-5cd6ccc8b13e | Yousha34/Array-manipulation | ReverseCopy.cpp | #include<iostream>
using namespace std ;
int main(){
int size ;
cout << "Enter no : " ;
cin >> size ;
int arr[size], brr[size] ;
for( int i = 0; i < size; i++ ){
cout << "Enter " << i+1 << " element : " ;
cin >> arr[i] ;
}
for( int i = 0; i < size; i++ ){
... | ALGO | 0.999683 | 3.264585 |
8360b122-6af4-4fc2-8a70-1bb787c2ce44 | aygulmardanova/openMP-tasks | task13.cpp | #include <stdio.h>
#include <iostream>
#include <omp.h>
#include <zconf.h>
using namespace std;
// ะะพะดะธัะธัะธััะนัะต ะทะฐะดะฐัั 1 ัะฐะบ, ััะพะฑั ะฟะพัะพะบะธ ัะฐัะฟะตัะฐััะฒะฐะปะธ ัะฒะพะธ ะธะดะตะฝัะธัะธะบะฐัะพัั ะฒ ะพะฑัะฐัะฝะพะผ ะฟะพััะดะบะต.
// ะกััะตััะฒัะตั ะบะฐะบ ะผะธะฝะธะผัะผ 5 ัะฟะพัะพะฑะพะฒ ัะตัะตะฝะธั.
void first(), second(), third(), loop(int);
int n = 8;
int main() {
om... | ALGO | 0.998124 | 3.579559 |
40821a37-fe70-4a98-888f-c224af1bc3c6 | CodeWithIsmail/Competitive-Programming | Codeforces/C_Clock_and_Strings.cpp | /// *** --- || In the name of ALLAH ||| --- *** ///
/// *** --- || Author: Code_with_Ismail ||| --- *** ///
#include <bits/stdc++.h>
using namespace std;
// Data Type:
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typede... | ALGO | 0.999801 | 3.864624 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.