首页
DreamJudge
院校信息
考研初试
机试真题
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
cc12345
2025年3月19日 14:28
矩阵位置 题解:暴力
P1543
回复 0
|
赞 2
|
浏览 389
#include<bits/stdc++.h> using namespace std; int main() { int n=3; int nums[3][3]={{1,2,3},{4,5,6},{7,8,9}}; while(n--){ int number; cin>>number; for(int i=0;i<3;i++){ for(int j=0;j<3;j++){ if(nums[i][j]==number) cout<<i+1<<" "<<j+1<<endl; ...
GENARDING
2025年3月16日 17:04
what can I say
P1543
回复 0
|
赞 1
|
浏览 358
#include <bits/stdc++.h> using namespace std; int main() { int a[3][3]={{1,2,3},{4,5,6},{7,8,9}}; int n; while(cin>>n){ for(int i=0;i<3;i++){ for(int j=0;j<3;j++){ if(a[i][j]==n){ cout<<i+1<<" "<<j+1<<e...
潇风青禾
2024年4月3日 11:32
矩阵位置 题解:
P1543
回复 0
|
赞 1
|
浏览 856
#include<bits/stdc++.h> using namespace std; int main(){ int n; int row; int col; while(cin >> n){ if(n%3==0) row = n / 3; else row = n / 3 + 1; col = n - (row-1) * 3; cout << row << " " << col << endl; } return 0; } ...
光明守护神
2024年3月17日 19:22
C++
P1543
回复 0
|
赞 0
|
浏览 944
#include<iostream> #include<string> using namespace std; int main() { int n; while (cin >> n) { switch (n) { case 1: cout << 1 << " " << 1 << endl; break; case 2: cout << 1 << " " << 2 << endl;...
小李122333
2024年3月3日 15:30
矩阵位置 题解:
P1543
回复 0
|
赞 0
|
浏览 1.0k
#include using namespace std; #include <bits/stdc++.h> using namespace std; int main(){ int n; int i,j; while(cin>>n){ j = n%3; if(j==0){ i = n/3; j=3; }else{ i = n/3 + 1; } cout<<i<<" "<<j<<endl; } r...
Syou
2023年8月17日 12:41
矩阵位置 题解:
P1543
回复 0
|
赞 0
|
浏览 1.2k
C++ #include <iostream> #include <vector> #include <algorithm> #include <string> using namespace std; int main(){ int n; int hang, lie; while(cin >> n){ hang = (n - 1) / 3 + 1; lie = (n - 1) % 3 + 1; cout << hang << " " << l...
SKYBQL
2021年8月27日 21:39
矩阵位置
P1543
回复 0
|
赞 2
|
浏览 6.2k
#include int main() { int n; int i,j; while(scanf("%d",&n)!=EOF) { i=n/3; if(n%3!=0) i++; &n...
题目
矩阵位置
题解数量
7
发布题解
在线答疑
热门题解
1
矩阵位置
2
矩阵位置 题解:暴力
3
矩阵位置 题解:
4
what can I say
5
C++
6
矩阵位置 题解:
7
矩阵位置 题解: