ubuntu下c++ Gedit配置

丢个配置。。 

编译

#!/bin/sh
fullname=$GEDIT_CURRENT_DOCUMENT_NAME
name=`echo $fullname | cut -d. -f1`
g++ -o $name $fullname -DIN


运行

#!/bin/sh
fullname=$GEDIT_CURRENT_DOCUMENT_NAME
name=`echo $fullname | cut -d. -f1`
dir=$GEDIT_CURRENT_DOCUMENT_DIR
gnome-terminal -x bash -c "$dir/$name; echo;echo 'Nobody knows delicious food better than Zhy';read"



代码补全

#include <cstdio>
#include <cstring>
#include <algorithm>

using namespace std;

#define R register
#define LL long long
const int inf=0x3f3f3f3f;
const int MAXN=;

inline int read() {
    char a=getchar(); int x=0,f=1;
    for(;a>'9'||a<'0';a=getchar()) if(a=='-') f=-1;
    for(;a>='0'&&a<='9';a=getchar()) x=x*10+a-'0';
    return x*f;
}

int main() {
    //freopen(".in","r",stdin);
    //freopen(".out","w",stdout);
    return 0;   
}

造数据

#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cstdlib>
#include <ctime>
using namespace std;

#define R register
#define LL long long

inline void printarr(int n) {
    int mod=10;
    for(R int i=1;i<=n;i++) printf("%d%c",rand()%mod,i==n?'\n':' ');
}

inline void printseg(int n) {
    int l=rand()%n+1,r=rand()%n+1;
    if(l>r) swap(l,r);
    printf("%d %d\n",l,r);
}

inline void printree(int n) {
    for(R int i=2;i<=n;i++) {
        printf("%d %d\n",i,rand()%(i-1)+1);
    }
}

int main() {
    srand(time(0));
    freopen("a.in","w",stdout);
    //freopen(".out","w",stdout);
    int n=10,m=10;
    return 0;   
}

对拍

#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cstdlib>

using namespace std;

#define R register

int main() {
    system("g++ -o a a.cpp");
    system("g++ -o b b.cpp");
    system("g++ -o m m.cpp");
    int tot=0;
    while(1) {
        system("./m");  
        system("./a");  
        system("./b");
        if(system("diff a.out b.out")) break;
        else printf("Case:%d Accept!\n",++tot);
    }
    return 0;   
}

原文链接: https://www.cnblogs.com/clover4/p/12848889.html

欢迎关注

微信关注下方公众号,第一时间获取干货硬货;公众号内回复【pdf】免费获取数百本计算机经典书籍;

也有高质量的技术群,里面有嵌入式、搜广推等BAT大佬

    ubuntu下c++ Gedit配置

原创文章受到原创版权保护。转载请注明出处:https://www.ccppcoding.com/archives/347127

非原创文章文中已经注明原地址,如有侵权,联系删除

关注公众号【高性能架构探索】,第一时间获取最新文章

转载文章受原作者版权保护。转载请注明原作者出处!

(0)
上一篇 2023年3月2日 上午4:20
下一篇 2023年3月2日 上午4:21

相关推荐