diff --git a/20240829/B4015/B4015.cpp b/20240829/B4015/B4015.cpp new file mode 100644 index 0000000..1e79dba --- /dev/null +++ b/20240829/B4015/B4015.cpp @@ -0,0 +1,33 @@ +#include +#include +#include +using namespace std; +typedef long long ll; + +ll readint(){ + int x=0,w=1; + char ch=0; + while(!isdigit(ch)){ + if(ch=='-')w=-1; + ch=getchar(); + } + while(isdigit(ch)){ + x=x*10+(ch-'0'); + ch=getchar(); + } + return x*w; +} + +int main(){ + const ll n=readint(),m=readint(); + ll ans{}; + for(int i=1;i<=n;i++){ + for(int j=1;j<=m;j++){ + ll num{readint()}; + if(i%3==2&&j%3==2){ + ans+=num; + } + } + } + printf("%lld",ans); +} \ No newline at end of file diff --git a/xmake.lua b/xmake.lua index 90ff4a1..32030f4 100644 --- a/xmake.lua +++ b/xmake.lua @@ -25,4 +25,7 @@ target("lq14sd") add_files("20240823/十四届蓝桥比赛/数独填数.cpp") target("P2615") - add_files("20240828/P2615/P2615.cpp") \ No newline at end of file + add_files("20240828/P2615/P2615.cpp") + +target("B4015") + add_files("20240829/B4015/B4015.cpp") \ No newline at end of file