The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The information about the size of the dataset is not coherent.
Error code: UnexpectedError
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
c2972d9f-a857-4dc0-b059-d51e5fe94486 | sidgujrathi/topcoder | Day 3 - Medium (Level 2)/BusSeating/BusSeating.cpp | // BEGIN CUT HERE
// END CUT HERE
#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cmath>
using namespace std;
vector<string> split( const string& s, const str... | ALGO | 0.999182 | 4.77715 |
16ac5a04-dcc5-4f30-802f-e7d7973dfd6f | keerthivnair/Codeforces-toSpecialist | day7/A_Game_with_Integers.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t;
while (t--)
{
int n;
cin >> n;
if (n % 3 == 0)
{
cout << "Second" << '\n';
}
else
{
cout << "First" << '\n';
}
}
return 0;
} | ALGO | 0.99992 | 4.193533 |
9e44c7f2-6c11-4591-82ae-6376f691d8ae | matteblack9/ProblemSolving | leetcode/UniquePaths.cpp | // O(N * N)
class Solution {
public:
int uniquePaths(int m, int n) {
vector<double> factorial(m + n - 1, 1);
for (int i = 1; i <= m + n - 2; i++)
factorial[i] = factorial[i - 1] * i;
return factorial[m + n - 2] / (factorial[m - 1] * factorial[n - 1]);
}
};
... | ALGO | 0.999951 | 6.70307 |
21426335-8073-426c-9b5d-f69dcc95f337 | ambedgar777/quiz_flutter | 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.998809 | 6.763549 |
41b12b55-d31c-492a-89bb-373af9e68482 | ishandutta2007/codeforces | nuip/normal/734/A.cpp | #include <string>
#include <vector>
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<stack>
#include<queue>
#include<cmath>
#include<algorithm>
#include<functional>
#include<list>
#include<deque>
#include<bitset>
#include<set>
#include<map>
#include<unordered_map>
#include<unordered_set>
#include<cstring>... | ALGO | 0.999969 | 3.390148 |
86eb45a4-004c-42c6-b133-8d9d7315b734 | raghadislam/problem-solving | Dijkstra/Jagged_Roads.cpp | /* problem link: https://codeforces.com/gym/104415/problem/J
* solution by: Raghad Islam
* date: 1-5-2025
*/
#include <bits/stdc++.h>
using namespace std;
void fileIO() {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
}
void fastIO() {
ios_base::sync... | ALGO | 0.999642 | 4.930468 |
d1971515-a18f-4b4a-b985-c211fabe4f41 | ncorbin003/PathFinder | main.cpp |
#include <iostream>
#include <limits.h>
#include "d_except.h"
#include <list>
#include <fstream>
#include "d_matrix.h"
#include <queue>
#include <vector>
#include <stack>
#include "graph.h"
//#include "d_graph.h"
class Map {
public:
Map() {
myMatrix;
}
Map(ifstream &fin) {
std::string inp... | ALGO | 0.99898 | 4.022065 |
5e436d72-52d3-4352-b694-2842143dce1c | oxygen-hunter/Flashboom | data/big-vul-100/add_attention_code/MixtralExpert/top0-100/maximum-value-sum-by-placing-three-rooks-i-Solution.maximumValueSum/177773_DoS_Exec_Code_Overflow_Mem._Corr..cpp | create_surface_from_thumbnail_data (guchar *data,
gint width,
gint height,
gint rowstride)
{
guchar *cairo_pixels;
cairo_surface_t *surface;
static cairo_user_data_key_t key;
int j;
cairo_pixels = (guchar *)g_malloc (4 * width * height);
surface = cairo_image_surface_... | ALGO | 0.999472 | 4.738873 |
d1d58834-b4e1-408c-8702-40c1cdea326a | SnowyJune973/acm | bzoj/2002.cpp | #include <cstdio>
#include <cstring>
#include <cstdlib>
#include <algorithm>
using namespace std;
const int maxn = 2e5+10;
int ki[maxn],dp[maxn],n,m;
void init(){
memset(dp,0,sizeof(dp));
}
int dfs(int x){
if(x+ki[x]>=n)return dp[x] = 1;
else return dp[x] = 1 + dfs(x+ki[x]);
}
void work(){
int pa1,pa2,p... | ALGO | 0.999952 | 3.614175 |
f11068e4-4409-4012-8aee-0a8c18907e92 | ishandutta2007/codeforces-s | sys/normal/717/A.cpp | #include <bits/stdc++.h>
using namespace std;
const int Maxn = 205, p = 1e9 + 7;
int k;
long long ans, l, r, fac[Maxn], S[Maxn][Maxn], C[Maxn][Maxn];
long long get_inv(int x)
{
if (x <= 1) return 1;
return (p - p / x) * get_inv(p % x) % p;
}
struct Complex
{
long long Re, Im;
Complex (long long _re = 0, long long ... | ALGO | 0.99995 | 3.984035 |
28a2b2b2-e8c5-4649-9904-f96c4847b764 | enjalot/BGERTPS | blender/intern/smoke/intern/LU_HELPER.cpp | /** \file smoke/intern/LU_HELPER.cpp
* \ingroup smoke
*/
#include "LU_HELPER.h"
int isNonsingular (sLU LU_) {
for (int j = 0; j < 3; j++) {
if (LU_.values[j][j] == 0)
return 0;
}
return 1;
}
sLU computeLU( float a[3][3])
{
sLU result;
int m=3;
int n=3;
//float LU_[3][3]... | ALGO | 0.999818 | 4.002901 |
d824bce2-5506-4ef7-9b85-47a8d73c64e5 | milindmadhukar/university | Design and Analysis of Algorithms/longest_common_subsequence_recursion_memoization.cpp | #include "string"
#include <algorithm>
#include <cstring>
#include <iostream>
#include <string>
int dp[100][100];
int lcs(const std::string &a, const std::string &b, int i, int j) {
if (dp[i][j] != -1)
return dp[i][j];
if (a[i] == '\0' || b[j] == '\0')
return 0;
else if (a[i] == b[j]) {
int val = ... | ALGO | 0.999627 | 5.010336 |
72df481f-9da5-472c-b067-61a4b14bb959 | jinwookss/algorithm-solutions | BOJ/Greedy/1541/1541.cpp | #include <iostream>
#include <sstream>
#include <vector>
using namespace std;
int main() {
string s;
cin >> s;
stringstream ss;
int result = 0;
bool minus = false;
for (char c : s) {
if (c == '-' || c == '+') {
int i;
ss >> i;
ss.clear();
... | ALGO | 0.999693 | 4.199671 |
990fc77f-91cf-46ba-afd7-4ced8399f27d | HiimHotta/URI | 1.Iniciante/036_Taxes.cpp | /******************************************************************************************************************
In an imaginary country called Lisarb, all the people are very happy to pay their taxes because they know that
doesn’t exist corrupt politicians and the taxes are used to benefit the population, without a... | ALGO | 0.997306 | 4.391469 |
40b70da9-9015-44fa-bc3c-73445dee033f | siddharth20323/OMP | omp1.cpp |
#include <iostream>
#include <omp.h>
using namespace std;
const int n = 3; // Define the size of the matrix
void matrix_mul(int a[n][n], int b[n][n], int c[n][n], int num_threads) {
#pragma omp_set_num_threads(num_threads); // Set number of threads
#pragma omp parallel for collapse(2)
for(int i = 0; i... | ALGO | 0.999915 | 4.623381 |
eba98bbe-d03f-4bf4-8379-aa569183b7cd | KiZaru0Iemon/atcoder | algorithms/gcd.cpp | /* ~~~ ユークリッド互除法による最大公約数 ~~~ */
// O(log(min(a,b)))
#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T a, T b) {
if(b==0)return a;
else return gcd<T>(b,a%b);
}
int main()
{
int a,b;
a=0;
b=15;
cout<< gcd<int>(a,b) <<endl;
}
| ALGO | 0.999241 | 4.183112 |
9e0cf8e4-fc82-458b-9616-2c52171226a8 | Mahad-Saffi/Programming_Fundamentals | Lab 9/task1.cpp | #include <iostream>
using namespace std;
void position(string word);
main()
{
string word;
cout << "Enter a word: ";
cin >> word;
position(word);
}
void position(string word)
{
for (int i = 0; i < word[i] != '\0'; i++)
{
cout << word[i] << " found at position " << i << endl;
}
} | ALGO | 0.994824 | 4.513576 |
3f6937b5-2f97-465d-8490-d1210ec5d116 | fightforhash/Interview-Prep | JungOl/1761.cpp | #include <iostream>
#include <vector>
#include <string>
using namespace std;
pair <int, int> countSB(string secret, string guess){ //민혁이 스트라이크, 볼개수 구해줌
int strike = 0, ball = 0;
for (int i = 0; i < 3; i++){
if (secret[i] == guess[i]){ //전체 조합과 민혁이의 세숫자 비교해서 따로 스트라이크 볼개수 구함
strike++;
... | ALGO | 0.998932 | 4.586487 |
d7736518-bea9-41a4-aa6b-776547fc0c85 | ofithcheallaigh/python_projects | pythonCode/Computer Vision/opencv-master/modules/imgproc/src/cornersubpix.cpp | #include "precomp.hpp"
void cv::cornerSubPix( InputArray _image, InputOutputArray _corners,
Size win, Size zeroZone, TermCriteria criteria )
{
CV_INSTRUMENT_REGION();
const int MAX_ITERS = 100;
int win_w = win.width * 2 + 1, win_h = win.height * 2 + 1;
int i, j, k;
int max_i... | ALGO | 0.999939 | 5.708128 |
b79699ee-141b-4307-8c51-d5f687f2ec4c | Anmol-Sri/Competitive-Environment | Codeforces Practice/61D.cpp | #include <bits/stdc++.h>
#define ll long long int
#define ld long double
#define pb push_back
#define mp make_pair
#define ar array
#define all(x) x.begin(), x.end()
#define mem(arr,x) memset(arr, x, sizeof arr)
#define db(arr) for(auto x : arr) cout << x << " "; cout << "\n";
#define db2d(arr) for(auto x : arr){ for(a... | ALGO | 0.999968 | 4.392784 |
52168115-b4e0-4b3b-82c3-17ad5bc85b46 | metehkaya/Algo-Archive | Problems/LeetCode/Solutions/1137.N-th_Tribonacci_Number.cpp | class Solution {
public:
int tribonacci(int n) {
if(n <= 1)
return n;
vector<int> f(n+1,0);
f[1] = 1;
f[2] = 1;
for( int i = 3 ; i <= n ; i++ )
f[i] = f[i-1] + f[i-2] + f[i-3];
return f[n];
}
}; | ALGO | 0.99995 | 5.995246 |
a693c603-7851-4338-bba6-8b0943c03fc5 | feixh/VISMA | thirdparty/libigl/include/igl/normalize_row_sums.cpp | template <typename DerivedA, typename DerivedB>
IGL_INLINE void igl::normalize_row_sums(
const Eigen::MatrixBase<DerivedA>& A,
Eigen::MatrixBase<DerivedB> & B)
{
#ifndef NDEBUG
// loop over rows
for(int i = 0; i < A.rows();i++)
{
typename DerivedB::Scalar sum = A.row(i).sum();
assert(sum != 0);
}
#e... | ALGO | 0.995353 | 3.82338 |
c3858629-1055-4070-a46d-50e20be9fbc4 | rohitbhatghare/c-c- | Oct-06-20/assignment183.cpp | #include<iostream>
using namespace std;
int main()
{
int i,j,n1,n2,n3,a1[100],a2[100],a3[100],mm=0,ctr=0;
cout<<"Enter the 1st number of elements \n";
cin>>n1;
cout<<"Enter elements of 1st array \n";
for(i=0;i<n1;i++)
{
cin>>a1[i];
}
cout<<"Enter the 2nd number of elements \... | ALGO | 0.999952 | 3.279577 |
3a69d0f4-bb22-43a8-a1e1-e1e13a69e98c | inferenceengine/renderdoc | renderdoc/driver/vulkan/vk_layer_android.cpp | #include <stdlib.h>
#include <string.h>
// RenderDoc Includes
#include "vk_common.h"
#include "vk_core.h"
#include "vk_hookset_defs.h"
#include "vk_resources.h"
// The android loader has limitations at present that require the enumerate functions
// to be exported with the precise canonical names. We just forward th... | TOOL | 0.921904 | 6.610729 |
4aaf4d05-a421-40f8-981e-03ef9bd50e8c | nathanzhu144/practices | tree/1379_find_corresp_node_in_clone_tree.cpp | /* Nathan Zhu April 17th, 2020 Starting at salesforce tomorrow!!
* Leetcode 1379 | medium | easy
* Category: Binary tree
* This question kinda boring.
*/
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
};
TreeNode* helper(Tr... | ALGO | 0.999809 | 6.009349 |
6a9ed2af-62e6-41d0-8780-04197225f93c | aashan007/Coding | challenges/LeetCode30DayChallenge-June/2.deleteNodeInALinkedList.cpp | void deleteNode(ListNode* node) {
ListNode * curr=node;
ListNode * nxt=node->next;
ListNode * prev=NULL;
while(nxt!=NULL){
curr->val=nxt->val;
prev =curr;
curr = curr->next;
nxt = nxt->next;
}
prev->next=NULL;
} | ALGO | 0.99898 | 3.969215 |
e52f6c64-2e6f-4ddb-9735-8863988305c2 | amsraman/Competitive_Programming | USACO/Contests/Silver/2017-2018/Contest 3/silver18feb2.cpp | #include <fstream>
#include <iostream>
using namespace std;
int n, b, f[250], m[250], ans;
pair<int,int> s[250];
bool v[250][250] = {false};
void dfs(int x, int y)
{
if(v[x][y])
{
return;
}
v[x][y] = true;
if(f[x]>s[y].first)
{
return;
}
if(x==n-1)
{
ans = ... | ALGO | 0.999943 | 3.8456 |
99da8533-8361-4df0-8345-491e99d065af | tiwaripari/codechef | chefffav2.cpp | #include<iostream>
#include<string>
using namespace std;
void fav(string str, int n)
{
int flag=0;
string sub;
for(int i=1;i<=n;i++)
{
if(str[i]=='c')
{
sub=str.substr(i,4);
if(sub=="code")
{
cout<<"AC"<<endl;
... | ALGO | 0.999336 | 3.102791 |
0efc84d1-dda6-4e31-a375-16ed5c8ed97f | Aethereux/Hikari-LLVM19 | libc/src/math/generic/lroundl.cpp | #include "src/math/lroundl.h"
#include "src/__support/FPUtil/NearestIntegerOperations.h"
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(long, lroundl, (long double x)) {
return fputil::round_to_signed_integer<long double, long>(x);
}
} ... | TOOL | 0.991938 | 6.113328 |
8d316a3d-003e-49cc-9d1a-eac0dd752b5d | ishandutta2007/codeforces | mhq/normal/1237/E.cpp | #ifdef DEBUG
#define _GLIBCXX_DEBUG
#endif
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
typedef long double ld;
typedef long long ll;
int n;
const int maxN = 4 * (int)1e6 + 100;
int f[maxN];
bool ok[maxN];
int sz[maxN];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);... | ALGO | 0.999986 | 3.910653 |
489fa81b-828b-4b2e-a2b3-ff0a8f2fe9cf | tommy16102/2022-algorithm-study | 2022/21주차/정환훈/3687_성냥개비.cpp | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int t;
int n;
long long dpS[101];
void init(){
int num[9] = {0, 0, 1, 7, 4, 2, 0, 8, 10};
for(int i=1;i<=9;i++){
dpS[i] = num[i];
}
dpS[6] = 6;
// 27 36 45
for(int i=9;i<=100;i++){
dpS[i] = 888888888888888;
for(int j=2;j<8;j++){
... | ALGO | 0.99977 | 4.578245 |
50a7752c-2ba5-4939-ac2d-6bd08bc93cee | istiaqueahmedarik/Phitron | week14/A_Two_Vessels.cpp | /*******************************************
@b |I|s|t|i|a|q|u|e| |A|h|m|e|d| |A|r|i|k|
********************************************/
#pragma GCC optimize("O3")
#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;
void _... | ALGO | 0.999785 | 4.333364 |
8953846f-3837-45ae-bd95-13f0324d684f | Morpheus636/FWCoreManager | src/CoreMgr/data_utils.cpp | #include <vector>
#include <string>
#include <fstream>
namespace data_utils {
const std::string WHITESPACE = " \n\r\t\f\v";
// Public Function
std::string StringLTrim(const std::string &s) {
size_t start = s.find_first_not_of(WHITESPACE);
return (start == std::string::npos) ? "" : s.substr(start);
}
// Public F... | TOOL | 0.993016 | 6.197839 |
4b6392f0-7c6a-4da6-8795-007162637469 | spirit6535/Codsun | vsCODE/recurs_funk/recfunck12.cpp | #include <iostream> //Бибилиотека ввода-вывода
using namespace std; //пространство стандартных имен
int decitich(int bin, int m = 1) { //Рекурсивная функция, для перевода в десятичную систему
if (bin == 0){
return 0; //Условие для нуля
}
return bin % 10 * m + decitich(bin / 10, 2 * m); //Вызов ф... | ALGO | 0.999546 | 4.279331 |
ba8ddcd8-75d2-481e-b02c-690fc1ff0347 | ZhumaevaVika/Semester3 | week1/classwork.cpp | #include <iostream>
using namespace std;
void qsort(void *base, size_t nmeb, size_t size, int (*compar)(const void *, const void *));
template<typename T>
bool compare(const T&l, const T&r){
return l<r;
}
struct S{
string name;
};
bool compare(const S&l, const S&r){
return l.name < r.name;
}
class Com... | ALGO | 0.985756 | 4.024495 |
5bf0b971-76f7-4477-95aa-bd603aa01770 | huypham37/sph | src/ParticleSystem.cpp | #include "ParticleSystem.hpp"
#include <cmath>
#include <iostream>
#include <algorithm>
#include "SPHConfig.hpp"
namespace sph
{
ParticleSystem::ParticleSystem(float width, float height, float smoothingRadius)
: width(width),
height(height),
smoothingRadius(Config::SMOOTHING_RADIUS)
{
// Create Grid for... | TOOL | 0.921562 | 6.057406 |
439894b0-2340-40ed-8e34-76b5ab28aaca | ammardab3an/AleppoCPC | level_2/subjects/complete search/brute force/during session codes/10360 - Rat Attack/rat_2.cpp |
// By AmmarDab3an - Aleppo University
#include "bits/stdc++.h"
using namespace std;
//#define int int64_t
//#define lli int64_t
typedef unsigned int uint;
typedef long long int lli;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<lli, lli> pll;
typedef pair<int, pii... | ALGO | 0.999831 | 4.372519 |
fcac43ad-4a2d-40cc-baec-2247b204d9dd | tanvir14012/Sphere-Online-Judge-My_Solutions | spoj FACT1.cpp | #include <bits/stdc++.h>
using namespace std;
#define sqN 1194967296
long long unsigned prime_list[100000000];/// long long unsigned na dile bipod
bool prime[sqN/2];
void Sieve()
{
long long unsigned count = 1,sqn = (long long unsigned)sqrt(sqN);
for(long long unsigned i = 3; i<= sqn; i+=2)
{
if(pr... | ALGO | 0.999897 | 4.119901 |
9bc051a4-df83-47dd-bcaf-c9c5dfa5e59e | iuyoy/basicCSKnowledge | leetcode/21. Merge Two Sorted Lists/MTSL.cpp | /*
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.
Example:
Input: 1->2->4, 1->3->4
Output: 1->1->2->3->4->4
*/
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* Lis... | ALGO | 0.999939 | 6.035256 |
bdcf6d2a-85a8-4cf6-9746-1e30b73cc898 | Saif502/CP_Hunter | C & c++ code/Codeforces/999a.cpp | #include<bits/stdc++.h>
#include<iostream>
#include<math.h>
#include<map>
#include<vector>
#include<string.h>
#define ll long long int
#define i_for(n) for(ll i=0;i<n;i++)
#define ri_for(n) for(ll i=n-1;i>=0;i--)
#define for_i(n) for(ll i=1;i<=n;i++)
#define j_for(n) for(ll j=0;j<n;j++)
#define rj_for(n) for(ll j=n-1;j... | ALGO | 0.999967 | 3.545766 |
54a8a533-7a95-4af4-b675-0df6f60b152a | mrinal-mann/Leetcode-Solved | 0005-longest-palindromic-substring/0005-longest-palindromic-substring.cpp | class Solution {
public:
string longestPalindrome(string s) {
string res = "";
int reslen = 0;
for (int i = 0; i < s.length(); i++) {
// Odd-length palindrome
int l = i, r = i;
while (l >= 0 && r < s.length() && s[l] == s[r]) {
if ((r - l ... | ALGO | 0.999975 | 6.383703 |
93ecb105-feba-400c-9801-d6ac03f8057d | zerls/PAT | pat_advanced/1100.cpp | using namespace std;
string ge[]={"tret","jan", "feb", "mar", "apr", "may", "jun", "jly", "aug", "sep", "oct", "nov", "dec"};
string shi[]={"###","tam", "hel", "maa", "huh", "tou", "kes", "hei", "elo", "syy", "lok", "mer", "jou"};
void func1(string &s){
int t=stoi(s);
if (t / 13) cout << shi[t / 13];
if ((t / ... | ALGO | 0.999326 | 3.806528 |
f34c867a-8874-40fa-b29f-3438a93fb276 | ishandutta2007/codeforces | alpha_q/normal/754/D.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef tree <pair <int, int>, null_type, greater <pair <int, int> >, rb_tree_tag, tree_order_statistics_node_update> OrderedSet;
const int N = 3e5 + 10;
const int ... | ALGO | 0.999982 | 3.763667 |
dd244f3f-8621-44cc-af91-c1192f90a62c | mehakk-Bhatia/Data-Structures | arrays/Maximum Sum With Exactly K Elements.cpp | class Solution {
public:
int maximizeSum(vector<int>& nums, int k) {
int n = nums.size();
int maxi = *max_element(nums.begin(), nums.end());
int x = 0 , ans=0;
for(int i=0 ; i<k ; i++){
x = maxi + i;
ans += x;
}
return ans;
... | ALGO | 0.999935 | 5.326857 |
8342f54b-dec6-4494-a82b-d9b965783303 | tsandheep/nd013-c6-control-starter | project/pid_controller/eigen-3.3.7/doc/examples/DenseBase_middleCols_int.cpp | #include <Eigen/Core>
#include <iostream>
using namespace Eigen;
using namespace std;
int main(void)
{
int const N = 5;
MatrixXi A(N,N);
A.setRandom();
cout << "A =\n" << A << '\n' << endl;
cout << "A(1..3,:) =\n" << A.middleCols(1,3) << endl;
return 0;
}
| ALGO | 0.97437 | 3.137892 |
ea8aa22e-4a83-4630-a182-cf74a66d562e | Chribela/Self_Driving_car | project_11_path_planning/src/Eigen-3.3/unsupported/doc/examples/MatrixFunction.cpp | #include <unsupported/Eigen/MatrixFunctions>
#include <iostream>
using namespace Eigen;
std::complex<double> expfn(std::complex<double> x, int)
{
return std::exp(x);
}
int main()
{
const double pi = std::acos(-1.0);
MatrixXd A(3,3);
A << 0, -pi/4, 0,
pi/4, 0, 0,
0, 0, 0;
std::... | ALGO | 0.999274 | 4.365858 |
4ccae67e-fe53-4d0b-aadd-81bd1f8be2e0 | zhang-fengdi/ControlGS | SIBR_viewers/src/core/view/IBRBasicUtils.cpp | #include "IBRBasicUtils.hpp"
namespace sibr {
std::vector<uint> IBRBasicUtils::selectCameras(const std::vector<InputCamera::Ptr>& cams, const Camera & eye, uint count)
{
// Select one method
return selectCamerasAngleWeight(cams, eye, count);
//return selectCamerasSimpleDist(cams, eye, count);
}
std::vector<... | ALGO | 0.995631 | 6.362492 |
85fa1178-f4ab-4ead-aeaf-95a0395d5647 | icoty/LeetCode | Algorithms/287.Find_the_Duplicate_Number.cpp | #include "AllInclude.h"
class Solution {
public: // https://www.cnblogs.com/grandyang/p/4843654.html
int findDuplicate(vector<int>& nums) {
if(nums.size() < 2)
return -1;
int l = 1;
int r = nums.size();
while(l < r){
int cnt =... | ALGO | 0.999914 | 5.627198 |
8b319666-9d8e-455b-93b9-e491b27f0e74 | byung-u/PracticeTest | _Algorithm/AlgoSpot_cpp/XHAENEUNG.cpp | #include <iostream>
#include <climits>
#include <cstring>
#define MAXCNT 10000
#define MAXBUF 32
struct T {
int outnum;
char in[MAXBUF];
char out[MAXBUF];
};
struct T t[MAXCNT];
char number[11][MAXBUF] =
{"zero","one","two","three","four","five","six","seven","eight","nine","ten"};
char ord_num[11][MAXB... | ALGO | 0.999547 | 3.691984 |
85ef977d-6547-4646-ac80-617907d70055 | sagarbhokre/Chariot | src/Eigen-3.3/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.999882 | 3.366961 |
bca5b01c-58ea-45db-ac06-56162a2fc9fe | FalseF/Problem-Solving | Toph/Problematic Problem Setters.cpp | /*######## IN THE NAME OF ALLAH ##########*/
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#include<bits/stdc++.h>
using namespace std;
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#pragma GCC diagnostic ignored "-Wformat"
#define ll long long... | ALGO | 0.999777 | 3.927181 |
77146098-4f94-4297-8e61-c68b871dd05d | Tastypotato245/boj | 1/1149/main.cpp | // https://www.acmicpc.net/problem/1149
// github/Tastypotato245
#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
using namespace std;
int N;
int rgb[1000][3];
void Solve()
{
cin >> N;
cin >> rgb[0][0];
cin >> rgb[0][1];
cin >> rgb[0][2];
for (int i = 1 ; i < N ; ++i)
{
int r, g,... | ALGO | 0.952375 | 4.544645 |
fdc50f1f-4f64-4078-ae3a-e22a929ad357 | IshyWishy17/Competitive-Coding | CSES/Sorting and Searching/tasks_deadlines.cpp | #include <iostream>
#include <string>
#include <bits/stdc++.h>
using namespace std;
void solve() {
int n;
cin >> n;
vector<pair<long long int, long long int>> tasks(n);
for (int i = 0; i < n; i++) cin >> tasks[i].first >> tasks[i].second;
sort(tasks.begin(), tasks.end());
long long int ans = 0;... | ALGO | 0.999906 | 4.752884 |
cb30c08f-dad0-49fb-8ec7-38743351d36f | ishandutta2007/codeforces | yousef_salama/normal/95/B.cpp | #include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <algorithm>
#include <bitset>
#include <math.h>
#include <queue>
#include <map>
#include <set>
#include <limits.h>
#include <limits>
#include <stdio.h>
#include <stdlib.h>
#include <sstream>
#include <string.h>
#include <assert.h>
#includ... | ALGO | 0.999844 | 4.547673 |
06b4c633-febb-4433-aee6-125e4bcf79df | Cattle0Horse/algorithm-problem | leetcode/leetcode_2492.cpp | /**
* @file leetcode_2492.cpp
* @author Cattle_Horse (<EMAIL>)
* @brief https://leetcode.cn/problems/minimum-score-of-a-path-between-two-cities/description/
* @version 0.1
* @date 2024-07-13
*
* @copyright Copyright (c) 2024
*
*/
#ifdef OY_LOCAL
#include <vector>
#include <iostream>
#include <algorithm>
using... | ALGO | 0.999948 | 5.753992 |
End of preview.
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.